TOLTECS: Replace snprintf() usage with Common::String::format()

Safer and less portability issues.
This commit is contained in:
David Turner 2011-06-02 03:06:41 +00:00 committed by Willem Jan Palenstijn
parent ddaf38bdcd
commit 8a34de2c45

View File

@ -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);