mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
LURE: Fix potential buffer overrun introduced in 8577606
This commit is contained in:
parent
1de6a461ab
commit
dd1838a3cb
@ -1925,7 +1925,7 @@ void Hotspot::doStatus(HotspotData *hotspot) {
|
||||
if (numGroats > 0) {
|
||||
Common::strlcat(buffer, "\n\n", MAX_DESC_SIZE);
|
||||
Common::strlcat(buffer, stringList.getString(S_YOU_HAVE), MAX_DESC_SIZE);
|
||||
snprintf(buffer + strlen(buffer), MAX_DESC_SIZE, "%d", numGroats);
|
||||
snprintf(buffer + strlen(buffer), MAX_DESC_SIZE - strlen(buffer), "%d", numGroats);
|
||||
Common::strlcat(buffer, " ", MAX_DESC_SIZE);
|
||||
Common::strlcat(buffer, stringList.getString((numGroats == 1) ? S_GROAT : S_GROATS), MAX_DESC_SIZE); // Make sure we're not overrunning
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user