From 8af79e11525b24e54e2e6adf98be155f9cd6a032 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 19:06:46 +0200 Subject: [PATCH] luainstance: work around a signed/unsigned problem on ppc --- src/gui/luainstance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index d979989dc..3be1806b7 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -374,7 +374,8 @@ int CLuaInstance::PaintBox(lua_State *L) y = luaL_checkint(L, 3); w = luaL_checkint(L, 4); h = luaL_checkint(L, 5); - c = luaL_checkint(L, 6); + /* luaL_checkint does not like e.g. 0xffcc0000 on powerpc (returns INT_MAX) instead */ + c = (unsigned int)luaL_checknumber(L, 6); if (count > 6) radius = luaL_checkint(L, 7); if (count > 7)