diff src/print.c @ 5295:2474dce7304e

Make sure (format "%b" 0) is non-zero length, print.c src/ChangeLog addition: 2010-10-25 Aidan Kehoe <kehoea@parhasard.net> * print.c (ulong_to_bit_string): If printing zero, actually print a zero, don't return the empty string. tests/ChangeLog addition: 2010-10-25 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Test format strings with %b, too.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 25 Oct 2010 13:15:53 +0100
parents 808131ba4a57
children b9167d522a9a
line wrap: on
line diff
--- a/src/print.c	Mon Oct 25 13:04:04 2010 +0100
+++ b/src/print.c	Mon Oct 25 13:15:53 2010 +0100
@@ -1339,6 +1339,12 @@
             }
         }
     }
+
+  if (!seen_high_order)
+    {
+      *p++ = '0';
+    }
+
   *p = '\0';
 }