Fix randomness in last change.
authorChris Hanson <org/chris-hanson/cph>
Sat, 11 Nov 1995 00:29:19 +0000 (00:29 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 11 Nov 1995 00:29:19 +0000 (00:29 +0000)
v7/src/microcode/prntenv.c

index 0820a03638b9188370fac4f9e5b61e9b705b4b35..9ea5d2c409ad6efb1a393b93b8c33a8d7c353188 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: prntenv.c,v 1.4 1995/11/10 23:47:05 cph Exp $
+$Id: prntenv.c,v 1.5 1995/11/11 00:29:19 cph Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -48,10 +48,10 @@ DEFINE_PRIMITIVE ("FILE-TIME->STRING", Prim_file_time_to_string, 1, 1,
   {
     time_t clock = (arg_integer (1));
     char * time_string = (ctime (&clock));
-    PRIMITIVE_RETURN
-      ((time_string == 0)
-       ? SHARP_F
-       : (char_pointer_to_string ((unsigned char *) time_string)));
+    if (time_string == 0)
+      PRIMITIVE_RETURN (SHARP_F);
+    (time_string[24]) = '\0';
+    PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) time_string));
   }
 }