Thu Feb 18 04:10:06 1993 John Gilmore (gnu@cygnus.com)
+ * c-lang.c (c_printstr): Bugfix for length==0 case.
+
* c-lang.c (c_printstr): If a C string ends in a null, don't
print the null.
/* If the string was not truncated due to `set print elements', and
the last byte of it is a null, we don't print that, in traditional C
style. */
- if ((!force_ellipses) && string[length-1] == '\0')
+ if ((!force_ellipses) && length > 0 && string[length-1] == '\0')
length--;
if (length == 0)