Index: Driver.c =================================================================== --- Driver.c (revision 6) +++ Driver.c (working copy) @@ -983,12 +983,17 @@ #endif { do { - if (*ptrTo++ != *ptrFrom++) { - return 1; // string content is different + if (*ptrTo != *ptrFrom) { + // string content is different + if(*ptrTo < *ptrFrom) + return -1; + return 1; } + ptrTo++; + ptrFrom++; } while (*ptrTo != 0); if (*ptrFrom != 0) { - return 1; // we have found a partial match - but one string is longer + return -1; // we have found a partial match - but the second string is longer } return 0; // both strings are identical }