From 1e09c653ec617420246941429bf534dc7e93fe91 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Wed, 3 Jan 2018 14:41:19 +0300 Subject: [PATCH] TIC-80 crashes when moving mouse over keys in sfx mode #493 --- src/studio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/studio.c b/src/studio.c index 85f40d4..894470a 100644 --- a/src/studio.c +++ b/src/studio.c @@ -474,7 +474,7 @@ bool fromClipboard(void* data, s32 size, bool flip, bool remove_white_spaces) void showTooltip(const char* text) { - strcpy(studio.tooltip.text, text); + strncpy(studio.tooltip.text, text, sizeof studio.tooltip.text - 1); } static void drawExtrabar(tic_mem* tic)