From 5f780de06158603016dccdbace8d6308c859d7a9 Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Thu, 17 Jun 2010 18:22:12 +0200 Subject: [PATCH] Fixed bug where 'result' was stored in global namespace (boot.lua) --- src/scripts/boot.lua | 6 +++--- src/scripts/boot.lua.h | 29 +++++++++++++++-------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index abed1ac7c..49a7527e2 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -838,9 +838,9 @@ end -- The root of all calls. ----------------------------------------------------------- -result = xpcall(love.boot, error_printer) +local result = xpcall(love.boot, error_printer) if not result then return end -result = xpcall(love.init, love.errhand) +local result = xpcall(love.init, love.errhand) if not result then return end -result = xpcall(love.run, love.errhand) +local result = xpcall(love.run, love.errhand) if not result then return end diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index ddd403fa4..954b21f51 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -1220,22 +1220,23 @@ const unsigned char boot_lua[] = 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D, 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D, 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D, - 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x0D,0x0A,0x0D,0x0A,0x72,0x65,0x73, - 0x75,0x6C,0x74,0x20,0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F, - 0x76,0x65,0x2E,0x62,0x6F,0x6F,0x74,0x2C,0x20,0x65,0x72,0x72,0x6F,0x72,0x5F, - 0x70,0x72,0x69,0x6E,0x74,0x65,0x72,0x29,0x0D,0x0A,0x69,0x66,0x20,0x6E,0x6F, - 0x74,0x20,0x72,0x65,0x73,0x75,0x6C,0x74,0x20,0x74,0x68,0x65,0x6E,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6E,0x20,0x65,0x6E,0x64,0x0D,0x0A,0x72,0x65,0x73,0x75, - 0x6C,0x74,0x20,0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F,0x76, - 0x65,0x2E,0x69,0x6E,0x69,0x74,0x2C,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x65,0x72, - 0x72,0x68,0x61,0x6E,0x64,0x29,0x0D,0x0A,0x69,0x66,0x20,0x6E,0x6F,0x74,0x20, - 0x72,0x65,0x73,0x75,0x6C,0x74,0x20,0x74,0x68,0x65,0x6E,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6E,0x20,0x65,0x6E,0x64,0x0D,0x0A,0x72,0x65,0x73,0x75,0x6C,0x74, - 0x20,0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F,0x76,0x65,0x2E, - 0x72,0x75,0x6E,0x2C,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x65,0x72,0x72,0x68,0x61, + 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x0D,0x0A,0x0D,0x0A,0x6C,0x6F,0x63, + 0x61,0x6C,0x20,0x72,0x65,0x73,0x75,0x6C,0x74,0x20,0x3D,0x20,0x78,0x70,0x63, + 0x61,0x6C,0x6C,0x28,0x6C,0x6F,0x76,0x65,0x2E,0x62,0x6F,0x6F,0x74,0x2C,0x20, + 0x65,0x72,0x72,0x6F,0x72,0x5F,0x70,0x72,0x69,0x6E,0x74,0x65,0x72,0x29,0x0D, + 0x0A,0x69,0x66,0x20,0x6E,0x6F,0x74,0x20,0x72,0x65,0x73,0x75,0x6C,0x74,0x20, + 0x74,0x68,0x65,0x6E,0x20,0x72,0x65,0x74,0x75,0x72,0x6E,0x20,0x65,0x6E,0x64, + 0x0D,0x0A,0x6C,0x6F,0x63,0x61,0x6C,0x20,0x72,0x65,0x73,0x75,0x6C,0x74,0x20, + 0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F,0x76,0x65,0x2E,0x69, + 0x6E,0x69,0x74,0x2C,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x65,0x72,0x72,0x68,0x61, 0x6E,0x64,0x29,0x0D,0x0A,0x69,0x66,0x20,0x6E,0x6F,0x74,0x20,0x72,0x65,0x73, 0x75,0x6C,0x74,0x20,0x74,0x68,0x65,0x6E,0x20,0x72,0x65,0x74,0x75,0x72,0x6E, - 0x20,0x65,0x6E,0x64,0x0D,0x0A, + 0x20,0x65,0x6E,0x64,0x0D,0x0A,0x6C,0x6F,0x63,0x61,0x6C,0x20,0x72,0x65,0x73, + 0x75,0x6C,0x74,0x20,0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F, + 0x76,0x65,0x2E,0x72,0x75,0x6E,0x2C,0x20,0x6C,0x6F,0x76,0x65,0x2E,0x65,0x72, + 0x72,0x68,0x61,0x6E,0x64,0x29,0x0D,0x0A,0x69,0x66,0x20,0x6E,0x6F,0x74,0x20, + 0x72,0x65,0x73,0x75,0x6C,0x74,0x20,0x74,0x68,0x65,0x6E,0x20,0x72,0x65,0x74, + 0x75,0x72,0x6E,0x20,0x65,0x6E,0x64,0x0D,0x0A, }; // [/boot.lua]