diff options
author | kraxel <kraxel> | 2008-06-09 14:53:33 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2008-06-09 14:53:33 +0000 |
commit | adbf9e28624a774ba5e488bf7a231dcfb5e2aff6 (patch) | |
tree | 015305ee881227cf85e298dbc201d8668302a7c2 /fbi.c | |
parent | 090f950d73cf40c49d22e5bf26a3f6a2ba0418c0 (diff) | |
download | fbida-adbf9e28624a774ba5e488bf7a231dcfb5e2aff6.tar.gz |
- Fix swprintf calls (size is # of wchar_t not bytes), found by Jesse Thilo.
Diffstat (limited to 'fbi.c')
-rw-r--r-- | fbi.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -400,12 +400,12 @@ static void status_update(unsigned char *desc, char *info) return; status_prepare(); - swprintf(str,sizeof(str),L"%s",desc); + swprintf(str,ARRAY_SIZE(str),L"%s",desc); shadow_draw_string(face, 0, yt, str, -1); if (info) { - swprintf(str,sizeof(str), L"[ %s ] H - Help", info); + swprintf(str,ARRAY_SIZE(str), L"[ %s ] H - Help", info); } else { - swprintf(str,sizeof(str), L"| H - Help"); + swprintf(str,ARRAY_SIZE(str), L"| H - Help"); } shadow_draw_string(face, fb_var.xres, yt, str, 1); @@ -419,7 +419,7 @@ static void status_error(unsigned char *msg) status_prepare(); - swprintf(str,sizeof(str), L"%s", msg); + swprintf(str,ARRAY_SIZE(str), L"%s", msg); shadow_draw_string(face, 0, yt, str, -1); shadow_render(); @@ -433,7 +433,7 @@ static void status_edit(unsigned char *msg, int pos) status_prepare(); - swprintf(str,sizeof(str), L"%s", msg); + swprintf(str,ARRAY_SIZE(str), L"%s", msg); shadow_draw_string_cursor(face, 0, yt, str, pos); shadow_render(); |