Permalink
Browse files

logging: Fix signedness error for %03o in safeprint (gave \37777777777s)

  • Loading branch information...
1 parent 2ec2bc6 commit b559404c9717b7290894333f1a98cc433b06829c ec429 committed Jul 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 logging.c
View
@@ -149,7 +149,7 @@ void safeprint(FILE *logf, const char *text, bool es)
while(*text)
{
if((!isprint(*text)) || (es&&isspace(*text)))
- fprintf(logf, "\\%03o", *text);
+ fprintf(logf, "\\%03o", (unsigned char)*text);
else
fputc(*text, logf);
text++;

0 comments on commit b559404

Please sign in to comment.