Skip to content

Commit cba6de6

Browse files
committed
remove gcc warning, hopefully...
1 parent 6369bc0 commit cba6de6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ static char * /* -> representation */
241241
regchar(ch)
242242
int ch;
243243
{
244-
static char buf[10];
244+
static char buf[16]; /* passed an 'int' requires 1 to 11 bytes octal storage */
245245

246246
if (isprint(ch) || ch == ' ')
247247
sprintf(buf, "%c", ch);
248248
else
249-
sprintf(buf, "\\%o", ch);
249+
sprintf(buf, "\\%o", (char)(ch & 0xff));
250250
return(buf);
251251
}

0 commit comments

Comments
 (0)