diff --git a/localtime.c b/localtime.c index 6f1bc03..9c3fe70 100644 --- a/localtime.c +++ b/localtime.c @@ -190,7 +190,7 @@ const char * const codep; register long result; register int i; - result = 0; + result = (codep[0] & 0x80) ? ~0L : 0L; for (i = 0; i < 4; ++i) result = (result << 8) | (codep[i] & 0xff); return result;