[Scummvm-git-logs] scummvm master -> e895296313977ef73e7cde54ed21f7f83c4f884e
sev-
sev at scummvm.org
Sat Feb 15 21:06:21 UTC 2020
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:
e895296313 ENGINES: Fix incoherent buffer size
Commit: e895296313977ef73e7cde54ed21f7f83c4f884e
https://github.com/scummvm/scummvm/commit/e895296313977ef73e7cde54ed21f7f83c4f884e
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2020-02-15T22:06:18+01:00
Commit Message:
ENGINES: Fix incoherent buffer size
Changed paths:
engines/metaengine.cpp
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index a296d90..3138cfc 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -36,17 +36,17 @@
#include "graphics/thumbnail.h"
const char *MetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
- static char buffer[100];
+ static char buffer[200];
- snprintf(buffer, 200, "%s.s%02d", target == nullptr ? getEngineId() : target, saveGameIdx);
+ snprintf(buffer, sizeof(buffer), "%s.s%02d", target == nullptr ? getEngineId() : target, saveGameIdx);
return buffer;
}
const char *MetaEngine::getSavegamePattern(const char *target) const {
- static char buffer[100];
+ static char buffer[200];
- snprintf(buffer, 200, "%s.s##", target == nullptr ? getEngineId() : target);
+ snprintf(buffer, sizeof(buffer), "%s.s##", target == nullptr ? getEngineId() : target);
return buffer;
}
More information about the Scummvm-git-logs
mailing list