[Scummvm-git-logs] scummvm master -> fd817e7e245347b39be8b16b092b376284a94244

aquadran noreply at scummvm.org
Wed Jul 23 13:10:20 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
fd817e7e24 WINTERMITE: Sync with original code


Commit: fd817e7e245347b39be8b16b092b376284a94244
    https://github.com/scummvm/scummvm/commit/fd817e7e245347b39be8b16b092b376284a94244
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-07-23T15:10:15+02:00

Commit Message:
WINTERMITE: Sync with original code

Changed paths:
    engines/wintermute/base/base_parser.cpp
    engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp


diff --git a/engines/wintermute/base/base_parser.cpp b/engines/wintermute/base/base_parser.cpp
index ca4f44ed5af..20557729035 100644
--- a/engines/wintermute/base/base_parser.cpp
+++ b/engines/wintermute/base/base_parser.cpp
@@ -388,7 +388,8 @@ int32 BaseParser::scanStr(const char *in, const char *format, ...) {
 					in++;
 					const char *in2 = strchr(in, '\'');
 					if (in2) {
-						Common::strlcpy(a, in, (int)(in2 - in) + 1);
+						strncpy(a, in, (int)(in2 - in));
+						a[(int)(in2 - in)] = 0;
 						in = in2 + 1;
 					} else {
 						// FIXME: Use a sensible value here
@@ -398,7 +399,8 @@ int32 BaseParser::scanStr(const char *in, const char *format, ...) {
 					}
 				} else {
 					const char *in2 = in + strspn(in, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.");
-					Common::strlcpy(a, in, (int)(in2 - in) + 1);
+					strncpy(a, in, (int)(in2 - in));
+					a[(int)(in2 - in)] = 0;
 					in = in2;
 				}
 				in += strspn(in, " \t\n\f");
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
index 5a94100bf40..7cdb298e67c 100644
--- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
@@ -260,7 +260,8 @@ bool SXMemBuffer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSt
 			stack->pushNULL();
 		} else {
 			char *str = new char[length + 1];
-			Common::strlcpy(str, (const char *)_buffer + start, length + 1);
+			strncpy(str, (const char *)_buffer + start, length);
+			str[length] = '\0';
 			stack->pushString(str);
 			delete[] str;
 		}




More information about the Scummvm-git-logs mailing list