diff options
author | D G Turner | 2019-09-15 00:03:11 +0100 |
---|---|---|
committer | D G Turner | 2019-09-15 00:03:11 +0100 |
commit | 8a65f44311657e2883646d67ec7dffdc4e2813b7 (patch) | |
tree | b102ab861557fe39af7608b83a9b05e2c33d5156 /engines/hdb | |
parent | 410923351b5c08395828ef42ebf1a74dd891e727 (diff) | |
download | scummvm-rg350-8a65f44311657e2883646d67ec7dffdc4e2813b7.tar.gz scummvm-rg350-8a65f44311657e2883646d67ec7dffdc4e2813b7.tar.bz2 scummvm-rg350-8a65f44311657e2883646d67ec7dffdc4e2813b7.zip |
HDB: Remove Another Fixed Size String Buffer
This reduces the scope for buffer overflow issues.
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/lua-script.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 13f406608b..82a52f7c24 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -811,9 +811,8 @@ static int setEntDir(lua_State *L) { int dd = (int)d; e->dir = (AIDir)dd; } else { - char buff[64]; - sprintf(buff, "Could not SetEntDir on '%s'", entName); - g_hdb->_window->openMessageBar(buff, 10); + Common::String entMessageString = Common::String::format("Could not SetEntDir on '%s'", entName); + g_hdb->_window->openMessageBar(entMessageString.c_str(), 10); } return 0; |