tAnother annoying signed char problem fixed. When writing out configuration fil… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f0717f841153c6092b87320068b4adcb8d4b64dc | |
parent 8cec7a7f2f476158073ff0fccbce3319d2b252ae | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 29 Apr 2002 10:22:26 +0000 | |
Another annoying signed char problem fixed. When writing out configuration | |
files, unprintable characters of code>127 are now converted properly to their | |
octal representation. | |
Diffstat: | |
M src/dopewars.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/src/dopewars.c b/src/dopewars.c | |
t@@ -2008,7 +2008,7 @@ static void PrintEscaped(FILE *fp, gchar *str) | |
if (isprint(str[i])) { | |
fputc(str[i], fp); | |
} else { | |
- fprintf(fp, "\\%o", str[i]); | |
+ fprintf(fp, "\\%o", (int)(guchar)str[i]); | |
} | |
} | |
} |