From e5533da60e29f1cbbd7f909023f2c256bd76464c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Jun 2011 22:18:27 -0700 Subject: [PATCH] * lread.c (Fload): Don't compare a possibly-garbage time_t value. --- src/ChangeLog | 2 ++ src/lread.c | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 973f9c1b2a..a9d47ebca1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-06-13 Paul Eggert + * lread.c (Fload): Don't compare a possibly-garbage time_t value. + GLYPH_CODE_FACE returns EMACS_INT, not int. * dispextern.h (merge_faces): * xfaces.c (merge_faces): diff --git a/src/lread.c b/src/lread.c index 0426cd4d54..b789457b22 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1203,10 +1203,13 @@ Return t if the file exists and loads successfully. */) #ifdef DOS_NT fmode = "rb"; #endif /* DOS_NT */ - stat (SSDATA (efound), &s1); - SSET (efound, SBYTES (efound) - 1, 0); - result = stat (SSDATA (efound), &s2); - SSET (efound, SBYTES (efound) - 1, 'c'); + result = stat (SSDATA (efound), &s1); + if (result == 0) + { + SSET (efound, SBYTES (efound) - 1, 0); + result = stat (SSDATA (efound), &s2); + SSET (efound, SBYTES (efound) - 1, 'c'); + } if (result == 0 && s1.st_mtime < s2.st_mtime) { -- 2.20.1