Browse Source

Forgot to increment i

Eric Andersen 23 năm trước cách đây
mục cha
commit
48518a1ae1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      test/args/arg_test.c

+ 1 - 1
test/args/arg_test.c

@@ -37,7 +37,7 @@ int main( int argc, char **argv)
 
 	i=0;
 	while(*index) {
-		fprintf(stderr, "environ[%d]='%s'\n", i, *index++);
+		fprintf(stderr, "environ[%d]='%s'\n", i++, *index++);
 	}
 
 	exit(0);