# HG changeset patch # User Gerd Moellmann # Date 1015872070 0 # Node ID ae392efb1660aebd646cc6a921670d7f880bcf46 # Parent 04ed48e48558e1f5039318bdbca3f575768bfd8e (Fload): Don't assume that message_with_ntring uses the string it is given like a C string. diff -r 04ed48e48558 -r ae392efb1660 src/lread.c --- a/src/lread.c Mon Mar 11 13:39:02 2002 +0000 +++ b/src/lread.c Mon Mar 11 18:41:10 2002 +0000 @@ -776,17 +776,22 @@ stat ((char *)XSTRING (found)->data, &s1); XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 0; result = stat ((char *)XSTRING (found)->data, &s2); + XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c'; + if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) { /* Make the progress messages mention that source is newer. */ newer = 1; /* If we won't print another message, mention this anyway. */ - if (! NILP (nomessage)) - message_with_string ("Source file `%s' newer than byte-compiled file", - found, 1); + if (!NILP (nomessage)) + { + Lisp_Object file; + file = Fsubstring (found, make_number (0), make_number (-1)); + message_with_string ("Source file `%s' newer than byte-compiled file", + file, SMBP (file)); + } } - XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c'; } } else