diff -urN findutils-4.1-orig/locate/locate.c findutils-4.1/locate/locate.c --- findutils-4.1-orig/locate/locate.c Mon Sep 26 23:06:14 1994 +++ findutils-4.1/locate/locate.c Fri May 10 01:40:45 2002 @@ -100,10 +100,14 @@ get_short (fp) FILE *fp; { - register short x; + register short x1, x2; - x = fgetc (fp); - return (x << 8) | (fgetc (fp) & 0xff); + x1 = fgetc (fp); + x2 = fgetc (fp); + if (x1 < 128) + return (x1 << 8) | (x2 & 0xff); + else + return -65536 + (x1 << 8) | (x2 & 0xff); } /* Return a pointer to the last character in a static copy of the last