mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 10:58:01 +00:00
TOLTECS: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
This commit is contained in:
parent
ddaf38bdcd
commit
8a34de2c45
@ -65,12 +65,12 @@ void ArchiveReader::dump(uint resIndex, const char *prefix) {
|
||||
int32 resourceSize = getResourceSize(resIndex);
|
||||
byte *data = new byte[resourceSize];
|
||||
|
||||
char fn[256];
|
||||
Common::String fn;
|
||||
|
||||
if (prefix)
|
||||
snprintf(fn, 256, "%s_%04X.0", prefix, resIndex);
|
||||
fn = Common::String::format("%s_%04X.0", prefix, resIndex);
|
||||
else
|
||||
snprintf(fn, 256, "%04X.0", resIndex);
|
||||
fn = Common::String::format("%04X.0", resIndex);
|
||||
|
||||
openResource(resIndex);
|
||||
read(data, resourceSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user