Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
StepfenShawn authored Apr 19, 2020
1 parent 5eebded commit 75a6e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sorting/gnome_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void sort(int *numbers, int size)
{
if (pos == 0)
pos = 1;
if (numbers[pos] >= numbers[pos-1] && pos==0)
if (numbers[pos] >= numbers[pos-1] || pos == 0)
pos++;
else
{
Expand Down

0 comments on commit 75a6e38

Please sign in to comment.