]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(numcompare): Handle comparison of two negative
authorJim Meyering <jim@meyering.net>
Thu, 6 May 1999 21:51:06 +0000 (21:51 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 6 May 1999 21:51:06 +0000 (21:51 +0000)
numbers correctly in the ENABLE_NLS case.

src/sort.c

index 9e7de66d073131e0bd46abd97050c791e9cef3ed..f9b4ccd4ec5068d6eb34181f004139d60f6a8b8c 100644 (file)
@@ -1317,7 +1317,7 @@ numcompare (register const char *a, register const char *b)
       if ((diff == 0) && (*a == decimal_point || *b == decimal_point))
        return ret_code * fraccompare (a, b);
 
-      return diff;             /* fall through here, and diff decides */
+      return ret_code * diff;  /* fall through here, and diff decides */
     }
 }
 #else