hedgewars/LuaPas.pas
changeset 10127 7f29a65aa1e4
parent 10124 aabd1b75d5a3
child 10230 361d36ec5181
--- a/hedgewars/LuaPas.pas	Sun Feb 09 19:00:13 2014 +0100
+++ b/hedgewars/LuaPas.pas	Mon Feb 10 00:43:03 2014 +0400
@@ -928,8 +928,10 @@
 end;
 
 function lua_tostringA(L : Plua_State; idx : LongInt) : ansistring;
+var p: PChar;
 begin
-    lua_tostringA := ansistring(lua_tolstring(L, idx, nil));
+    p:= lua_tolstring(L, idx, nil);
+    lua_tostringA := ansistring(p);
 end;
 
 function lua_open : Plua_State;