\r
if (maxw < 0)\r
return;\r
-\r
- strncpy(buffer, texto, sizeof(buffer));\r
if (maxw > sizeof(buffer) - 1)\r
maxw = sizeof(buffer) - 1;\r
+\r
+ strncpy(buffer, texto, maxw);\r
buffer[maxw] = 0;\r
\r
smalltext_out16_(x, y, buffer, color);\r
name = ent->generate_name(ent->id, &offs);\r
}\r
if (name != NULL) {\r
- text_out16(x, y, name);\r
+ text_out16(x, y, "%s", name);\r
leftname_end = x + (strlen(name) + 1) * me_mfont_w;\r
}\r
\r
case MB_NONE:\r
break;\r
case MB_OPT_ONOFF:\r
- text_out16(x + col2_offs, y, me_read_onoff(ent) ? "ON" : "OFF");\r
+ text_out16(x + col2_offs, y, "%s", me_read_onoff(ent) ? "ON" : "OFF");\r
break;\r
case MB_OPT_RANGE:\r
text_out16(x + col2_offs, y, "%i", *(int *)ent->var);\r
h = (g_menuscreen_h - h) / 2; // bottom area height\r
if (menu_error_msg[0] != 0) {\r
if (h >= me_mfont_h + 4)\r
- text_out16(5, g_menuscreen_h - me_mfont_h - 4, menu_error_msg);\r
+ text_out16(5, g_menuscreen_h - me_mfont_h - 4, "%s", menu_error_msg);\r
else\r
lprintf("menu msg doesn't fit!\n");\r
\r
menu_draw_begin(1, 0);\r
\r
for (p = msg; *p != 0 && y <= g_menuscreen_h - me_mfont_h; y += me_mfont_h) {\r
- text_out16(x, y, p);\r
+ text_out16(x, y, "%s", p);\r
\r
for (; *p != 0 && *p != '\n'; p++)\r
;\r
snprintf(tmp + len, sizeof(tmp) - len, "%s - cancel)", nm);\r
len = strlen(tmp);\r
\r
- text_out16(mid - me_mfont_w * len / 2, 12 * me_mfont_h, tmp);\r
+ text_out16(mid - me_mfont_w * len / 2, 12 * me_mfont_h, "%s", tmp);\r
menu_draw_end();\r
\r
while (in_menu_wait_any(NULL, 50) & (PBTN_MENU|PBTN_MA2));\r
snprintf(buff2, sizeof(buff2), "%s", in_get_key_name(-1, -PBTN_MOK));\r
snprintf(buff, sizeof(buff), "%s - bind, %s - clear", buff2,\r
in_get_key_name(-1, -PBTN_MA2));\r
- text_out16(x, g_menuscreen_h - 4 * me_mfont_h, buff);\r
+ text_out16(x, g_menuscreen_h - 4 * me_mfont_h, "%s", buff);\r
}\r
else\r
text_out16(x, g_menuscreen_h - 4 * me_mfont_h, "Press a button to bind/unbind");\r
\r
if (dev_count > 1) {\r
- text_out16(x, g_menuscreen_h - 3 * me_mfont_h, dev_name);\r
+ text_out16(x, g_menuscreen_h - 3 * me_mfont_h, "%s", dev_name);\r
text_out16(x, g_menuscreen_h - 2 * me_mfont_h, "Press left/right for other devs");\r
}\r
\r