[Scummvm-git-logs] scummvm master -> 39cc7dc97dce22b8b3b6e97aaa30b4169cccee20
digitall
noreply at scummvm.org
Sun Feb 12 12:29:17 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
39cc7dc97d HPL1: Fix GCC Compiler Warning of Possible Format Truncation
Commit: 39cc7dc97dce22b8b3b6e97aaa30b4169cccee20
https://github.com/scummvm/scummvm/commit/39cc7dc97dce22b8b3b6e97aaa30b4169cccee20
Author: D G Turner (digitall at scummvm.org)
Date: 2023-02-12T12:27:38Z
Commit Message:
HPL1: Fix GCC Compiler Warning of Possible Format Truncation
This replaces the usage of snprintf() with Common::String::format()
Changed paths:
engines/hpl1/engine/graphics/ImageEntityData.cpp
diff --git a/engines/hpl1/engine/graphics/ImageEntityData.cpp b/engines/hpl1/engine/graphics/ImageEntityData.cpp
index cb9787409ed..797216662da 100644
--- a/engines/hpl1/engine/graphics/ImageEntityData.cpp
+++ b/engines/hpl1/engine/graphics/ImageEntityData.cpp
@@ -226,13 +226,11 @@ bool cImageEntityData::CreateFromFile(const tString &asFile, tIntVec &avImageHan
tString sFile;
if (bGotAnim) {
int lNum = i + 1;
- char buff[5];
- snprintf(buff, 5, "%d", lNum);
sFile = sImageName;
if (lNum < 10)
sFile += "0";
- sFile += buff;
+ sFile += Common::String::format("%d", lNum).c_str();
} else {
sFile = sImageName;
}
More information about the Scummvm-git-logs
mailing list