[Scummvm-git-logs] scummvm master -> 8e302368fff80c75530d4cb8ad0f588e42dfe9b9

aquadran noreply at scummvm.org
Thu Nov 7 11:18:27 UTC 2024


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:
8e302368ff GRIM: Graceful handling error as warning for imSet/Get param. Mentioned in bug report 11841


Commit: 8e302368fff80c75530d4cb8ad0f588e42dfe9b9
    https://github.com/scummvm/scummvm/commit/8e302368fff80c75530d4cb8ad0f588e42dfe9b9
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2024-11-07T12:18:22+01:00

Commit Message:
GRIM: Graceful handling error as warning for imSet/Get param. Mentioned in bug report 11841

Changed paths:
    engines/grim/lua_v1_sound.cpp


diff --git a/engines/grim/lua_v1_sound.cpp b/engines/grim/lua_v1_sound.cpp
index eae50f4326c..72a7f4987e1 100644
--- a/engines/grim/lua_v1_sound.cpp
+++ b/engines/grim/lua_v1_sound.cpp
@@ -130,10 +130,11 @@ void Lua_V1::ImSetParam() {
 	lua_Object paramObj = lua_getparam(2);
 	lua_Object valueObj = lua_getparam(3);
 
-	if (lua_isnumber(nameObj))
-		error("ImSetParam: getting name from number is not supported");
+	if (lua_isnumber(nameObj)) {
+		warning("ImSetParam: getting name from number is not supported");
+		return;
+	}
 	if (!lua_isstring(nameObj)) {
-		lua_pushnumber(-1.0);
 		return;
 	}
 
@@ -158,8 +159,11 @@ void Lua_V1::ImGetParam() {
 	lua_Object nameObj = lua_getparam(1);
 	lua_Object paramObj = lua_getparam(2);
 
-	if (lua_isnumber(nameObj))
-		error("ImGetParam: getting name from number is not supported");
+	if (lua_isnumber(nameObj)) {
+		warning("ImGetParam: getting name from number is not supported");
+		lua_pushnumber(-1.0);
+		return;
+	}
 	if (!lua_isstring(nameObj)) {
 		lua_pushnumber(-1.0);
 		return;




More information about the Scummvm-git-logs mailing list