From adbf9e28624a774ba5e488bf7a231dcfb5e2aff6 Mon Sep 17 00:00:00 2001 From: kraxel Date: Mon, 9 Jun 2008 14:53:33 +0000 Subject: - Fix swprintf calls (size is # of wchar_t not bytes), found by Jesse Thilo. --- fbi.c | 10 +++++----- 1 file 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(); -- cgit