Commit 051eb22f authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Use a cast to prevent sign extension instead of masking it off after the fact.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2193 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f75c69cc
......@@ -353,7 +353,7 @@ VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned
if (*ptr >= ' ' && *ptr <= '~')
fprintf(fo, "%c", *ptr);
else
fprintf(fo, "%%%02x", (*ptr) & 0xff);
fprintf(fo, "%%%02x", (unsigned char)*ptr);
ptr++;
}
fprintf(fo, "\"\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment