[Scummvm-git-logs] scummvm master -> 1f35872fdeff49db6065b071d35833747c93feee

aquadran aquadran at gmail.com
Mon Mar 8 18:06:35 UTC 2021


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:
1f35872fde ICB: Restore previous change and fix variable type to get 'while' actually to work


Commit: 1f35872fdeff49db6065b071d35833747c93feee
    https://github.com/scummvm/scummvm/commit/1f35872fdeff49db6065b071d35833747c93feee
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-03-08T19:06:29+01:00

Commit Message:
ICB: Restore previous change and fix variable type to get 'while' actually to work

Changed paths:
    engines/icb/common/px_string.cpp


diff --git a/engines/icb/common/px_string.cpp b/engines/icb/common/px_string.cpp
index c04a57473d..bc0f35d0c0 100644
--- a/engines/icb/common/px_string.cpp
+++ b/engines/icb/common/px_string.cpp
@@ -32,6 +32,8 @@
 
 namespace ICB {
 
+#define SLEN_CHECK (slen < 0)
+
 const char *pxString::operator=(const char *str) {
 	// Assign a value
 
@@ -231,10 +233,10 @@ const pxString &pxString::Format(const char *format, ...) {
 
 	// Process the variable arguments
 	va_list arglist;
-	uint32 slen;
+	int32 slen;
 
 	// Keep doubling the size of the buffer until it fits
-	while (va_start(arglist, format), slen = vsnprintf(s, startBufferSize, const_cast<char *>(format), arglist)) {
+	while (va_start(arglist, format), slen = vsnprintf(s, startBufferSize, const_cast<char *>(format), arglist), SLEN_CHECK) {
 		delete[] s;
 
 		startBufferSize += startBufferSize;




More information about the Scummvm-git-logs mailing list