diff options
Diffstat (limited to 'engines/wintermute/Base/scriptables/SXString.cpp')
-rw-r--r-- | engines/wintermute/Base/scriptables/SXString.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/wintermute/Base/scriptables/SXString.cpp b/engines/wintermute/Base/scriptables/SXString.cpp index 60a58d3cfd..172ae32ad1 100644 --- a/engines/wintermute/Base/scriptables/SXString.cpp +++ b/engines/wintermute/Base/scriptables/SXString.cpp @@ -357,8 +357,8 @@ HRESULT CSXString::scSetProperty(const char *name, CScValue *value) { // Capacity
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Capacity") == 0) {
- int newCap = value->getInt();
- if (newCap < strlen(_string) + 1) Game->LOG(0, "Warning: cannot lower string capacity");
+ int32 newCap = (uint32)value->getInt();
+ if (newCap < (int32)(strlen(_string) + 1)) Game->LOG(0, "Warning: cannot lower string capacity");
else if (newCap != _capacity) {
char *newStr = new char[newCap];
if (newStr) {
|