aboutsummaryrefslogtreecommitdiffstats
path: root/fbi.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2008-06-09 14:53:33 +0000
committerkraxel <kraxel>2008-06-09 14:53:33 +0000
commitadbf9e28624a774ba5e488bf7a231dcfb5e2aff6 (patch)
tree015305ee881227cf85e298dbc201d8668302a7c2 /fbi.c
parent090f950d73cf40c49d22e5bf26a3f6a2ba0418c0 (diff)
downloadfbida-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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fbi.c b/fbi.c
index 43934de..79af5d7 100644
--- a/fbi.c
+++ b/fbi.c
@@ -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();