[Scummvm-git-logs] scummvm master -> eb04cff38df52220c8b3518d5d8c503ddd3bc1bb
sev-
sev at scummvm.org
Mon Apr 27 20:47:06 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:
eb04cff38d COMMON: Swtich scumm_strdup to malloc(), so its behaviour matches strdup()
Commit: eb04cff38df52220c8b3518d5d8c503ddd3bc1bb
https://github.com/scummvm/scummvm/commit/eb04cff38df52220c8b3518d5d8c503ddd3bc1bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T22:46:22+02:00
Commit Message:
COMMON: Swtich scumm_strdup to malloc(), so its behaviour matches strdup()
Changed paths:
common/str.cpp
diff --git a/common/str.cpp b/common/str.cpp
index 068f4ac690..a60718075e 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -1312,7 +1312,7 @@ int scumm_compareDictionary(const char *s1, const char *s2) {
// Portable implementation of strdup.
char *scumm_strdup(const char *in) {
const size_t len = strlen(in) + 1;
- char *out = new char[len];
+ char *out = (char *)malloc(len);
if (out) {
strcpy(out, in);
}
More information about the Scummvm-git-logs
mailing list