aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert2011-06-12 22:18:27 -0700
committerPaul Eggert2011-06-12 22:18:27 -0700
commite5533da60e29f1cbbd7f909023f2c256bd76464c (patch)
tree205177cea9a8e75fa0c972b970637f8dd01b70e5 /src/lread.c
parent9910e595e7142801eb2bbf13ca37d4d10f57f25b (diff)
downloademacs-e5533da60e29f1cbbd7f909023f2c256bd76464c.tar.gz
emacs-e5533da60e29f1cbbd7f909023f2c256bd76464c.zip
* lread.c (Fload): Don't compare a possibly-garbage time_t value.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c
index 0426cd4d548..b789457b223 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1203,10 +1203,13 @@ Return t if the file exists and loads successfully. */)
1203#ifdef DOS_NT 1203#ifdef DOS_NT
1204 fmode = "rb"; 1204 fmode = "rb";
1205#endif /* DOS_NT */ 1205#endif /* DOS_NT */
1206 stat (SSDATA (efound), &s1); 1206 result = stat (SSDATA (efound), &s1);
1207 SSET (efound, SBYTES (efound) - 1, 0); 1207 if (result == 0)
1208 result = stat (SSDATA (efound), &s2); 1208 {
1209 SSET (efound, SBYTES (efound) - 1, 'c'); 1209 SSET (efound, SBYTES (efound) - 1, 0);
1210 result = stat (SSDATA (efound), &s2);
1211 SSET (efound, SBYTES (efound) - 1, 'c');
1212 }
1210 1213
1211 if (result == 0 && s1.st_mtime < s2.st_mtime) 1214 if (result == 0 && s1.st_mtime < s2.st_mtime)
1212 { 1215 {