From: antirez <antirez@gmail.com>
Date: Fri, 13 Apr 2012 12:54:49 +0000 (+0200)
Subject: Use Lua tostring() before concatenation.
X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/3a0214041542433895004f2fe97b08a3c4e9cb61

Use Lua tostring() before concatenation.
---

diff --git a/src/scripting.c b/src/scripting.c
index 76b25ad2..c449714f 100644
--- a/src/scripting.c
+++ b/src/scripting.c
@@ -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";