diff --git a/cucul/export.c b/cucul/export.c index 7e009c7..f3b7579 100644 --- a/cucul/export.c +++ b/cucul/export.c @@ -176,8 +176,10 @@ static void export_caca(cucul_canvas_t *cv, cucul_buffer_t *ex) h = cv->height; cur += sprintf(cur, "CACACANV%c%c%c%c%c%c%c%c", - (w >> 24), (w >> 16) & 0xff, (w >> 8) & 0xff, w & 0xff, - (h >> 24), (h >> 16) & 0xff, (h >> 8) & 0xff, h & 0xff); + (unsigned char)(w >> 24), (unsigned char)((w >> 16) & 0xff), + (unsigned char)((w >> 8) & 0xff), (unsigned char)(w & 0xff), + (unsigned char)(h >> 24), (unsigned char)((h >> 16) & 0xff), + (unsigned char)((h >> 8) & 0xff), (unsigned char)(h & 0xff)); for(n = cv->height * cv->width; n--; ) { @@ -379,9 +381,11 @@ static void export_html(cucul_canvas_t *cv, cucul_buffer_t *ex) if(linechar[x + len] <= 0x00000020) cur += sprintf(cur, " "); else if(linechar[x + len] < 0x00000080) - cur += sprintf(cur, "%c", linechar[x + len]); + cur += sprintf(cur, "%c", + (unsigned char)linechar[x + len]); else - cur += sprintf(cur, "%i;", linechar[x + len]); + cur += sprintf(cur, "%i;", + (unsigned int)linechar[x + len]); } cur += sprintf(cur, ""); } @@ -436,13 +440,13 @@ static void export_html3(cucul_canvas_t *cv, cucul_buffer_t *ex) while(x + len < cv->width && lineattr[x + len] == lineattr[x]) len++; - cur += sprintf(cur, "