From: Fredrik Tolf Date: Tue, 19 Jun 2012 18:39:32 +0000 (+0200) Subject: accesslog: Fixed quoting sign-extension. X-Git-Tag: 0.11~13 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=9a98cec1b50ed03008cccf2778db47c0f4f23cc3 accesslog: Fixed quoting sign-extension. --- diff --git a/src/accesslog.c b/src/accesslog.c index 3a978e0..0c292c8 100644 --- a/src/accesslog.c +++ b/src/accesslog.c @@ -58,7 +58,7 @@ static void qputs(char *s, FILE *o) } else if(*s == '\t') { fputs("\\t", o); } else if((*s < 32) || (*s >= 128)) { - fprintf(o, "\\x%02x", *s); + fprintf(o, "\\x%02x", (int)(unsigned char)*s); } else { fputc(*s, o); }