summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/misc_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 5252832b5..dd7541062 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -656,7 +656,7 @@ struct TooltipsWindow : public Window
this->string_id = str;
assert_compile(sizeof(this->params[0]) == sizeof(params[0]));
assert(paramcount <= lengthof(this->params));
- memcpy(this->params, params, sizeof(this->params[0]) * paramcount);
+ if (paramcount > 0) memcpy(this->params, params, sizeof(this->params[0]) * paramcount);
this->paramcount = paramcount;
this->close_cond = close_tooltip;