]> git.saurik.com Git - redis.git/commitdiff
Use Lua tostring() before concatenation.
authorantirez <antirez@gmail.com>
Fri, 13 Apr 2012 12:54:49 +0000 (14:54 +0200)
committerantirez <antirez@gmail.com>
Fri, 13 Apr 2012 14:23:38 +0000 (16:23 +0200)
src/scripting.c

index 76b25ad2334e5e455f238e6426ea59d19ea45574..c449714f5cc1f28db9a81d49b6cd2df434af51fd 100644 (file)
@@ -437,7 +437,7 @@ void scriptingEnableGlobalsProtection(lua_State *lua) {
     s[j++]="end\n";
     s[j++]="mt.__index = function (t, n)\n";
     s[j++]="  if debug.getinfo(2) and debug.getinfo(2, \"S\").what ~= \"C\" then\n";
-    s[j++]="    error(\"Script attempted to access unexisting global variable '\"..n..\"'\", 2)\n";
+    s[j++]="    error(\"Script attempted to access unexisting global variable '\"..tostring(n)..\"'\", 2)\n";
     s[j++]="  end\n";
     s[j++]="  return rawget(t, n)\n";
     s[j++]="end\n";