mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
CGE2: Fix write overflow compiler warning
This commit is contained in:
parent
a9dac765fe
commit
bc7613e1fb
@ -112,12 +112,15 @@ char *VMenu::vmGather(Common::Array<Choice *> list) {
|
||||
}
|
||||
len += h;
|
||||
_vmgt = new char[len];
|
||||
*_vmgt = '\0';
|
||||
for (uint i = 0; i < list.size(); i++) {
|
||||
if (*_vmgt)
|
||||
Common::strcat_s(_vmgt, len, "|");
|
||||
Common::strcat_s(_vmgt, len, list[i]->_text);
|
||||
++h;
|
||||
|
||||
if (len) {
|
||||
*_vmgt = '\0';
|
||||
for (uint i = 0; i < list.size(); i++) {
|
||||
if (*_vmgt)
|
||||
Common::strcat_s(_vmgt, len, "|");
|
||||
Common::strcat_s(_vmgt, len, list[i]->_text);
|
||||
++h;
|
||||
}
|
||||
}
|
||||
|
||||
return _vmgt;
|
||||
|
Loading…
Reference in New Issue
Block a user