diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-05-31 13:25:11 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-05-31 13:25:11 -0700 |
| commit | 67b62c7294984eaa3b199765dd76b258dc979473 (patch) | |
| tree | 2311b9f5cee690ee523378262f1fd805394eb8bc /draw.c | |
| parent | 60db11fbb8f5893047aae4289ceccd6b712b5f2d (diff) | |
Added lots of extra compiler checks and fixed a few minor issues.
Diffstat (limited to 'draw.c')
| -rw-r--r-- | draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,7 +46,7 @@ static char* stpcpy_escaped(char *buf, const char *str, const char *color) if (*c > 0 && *c <= '\x1b' && escapes[(int)*c] != ' ') { // "\n", etc. buf += sprintf(buf, "\033[31m\\%c%s", escapes[(int)*c], color); } else if (*c >= 0 && !(' ' <= *c && *c <= '~')) { // "\x02", etc. - buf += sprintf(buf, "\033[31m\\x%02X%s", *c, color); + buf += sprintf(buf, "\033[31m\\x%02X%s", (unsigned int)*c, color); } else { *(buf++) = *c; } @@ -69,7 +69,7 @@ static int fputs_escaped(FILE *f, const char *str, const char *color) fprintf(f, "\033[31m\\%c%s", escapes[(int)*c], color); ++escaped; } else if (*c >= 0 && !(' ' <= *c && *c <= '~')) { // "\x02", etc. - fprintf(f, "\033[31m\\x%02X%s", *c, color); + fprintf(f, "\033[31m\\x%02X%s", (unsigned int)*c, color); ++escaped; } else { fputc(*c, f); |
