diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/queen/command.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/queen/command.cpp b/engines/queen/command.cpp index 2a793a51c7..3866f6eca8 100644 --- a/engines/queen/command.cpp +++ b/engines/queen/command.cpp @@ -61,7 +61,7 @@ void CmdText::displayTemp(InkColor color, Verb v) { void CmdText::displayTemp(InkColor color, const char *name, bool outlined) { char temp[MAX_COMMAND_LEN]; - sprintf(temp, "%s %s", _command, name); + snprintf(temp, MAX_COMMAND_LEN, "%s %s", _command, name); display(color, temp, outlined); } @@ -87,7 +87,7 @@ public: virtual void displayTemp(InkColor color, const char *name, bool outlined) { char temp[MAX_COMMAND_LEN]; - sprintf(temp, "%s %s", name, _command); + snprintf(temp, MAX_COMMAND_LEN, "%s %s", name, _command); display(color, temp, outlined); } @@ -119,9 +119,9 @@ public: char temp[MAX_COMMAND_LEN]; // don't show a space after the goto and give commands in the Greek version if (_command[1] != (char)-34 && !(_command[1] == (char)-2 && strlen(_command) > 5)) - sprintf(temp, "%s %s", _command, name); + snprintf(temp, MAX_COMMAND_LEN, "%s %s", _command, name); else - sprintf(temp, "%s%s", _command, name); + snprintf(temp, MAX_COMMAND_LEN, "%s%s", _command, name); display(color, temp, outlined); } |