diff --git a/src/strcmp.c b/src/strcmp.c index 4b6bf3c..c9d56b0 100644 --- a/src/strcmp.c +++ b/src/strcmp.c @@ -37,8 +37,10 @@ int main(int argc, char *argv[]) { for (; *argv[1] != '\0'; ++argv[1]) { for (i = 2; i < argc; ++i) { - if (*argv[i-1] > *argv[i]) { + /* a former string has a greater byte value */ + if (*argv[i-1] > *argv[i]) { return 1; + /* a latter string has a greater byte value */ } else if (*argv[i-1] < *argv[i]++) { return -1; /* actually 255 */ }