Browse Source

Fixed bug where 'result' was stored in global namespace (boot.lua)

[email protected] 15 years ago
parent
commit
5f780de061
2 changed files with 17 additions and 16 deletions
  1. 3 3
      src/scripts/boot.lua
  2. 14 13
      src/scripts/boot.lua.h

+ 3 - 3
src/scripts/boot.lua

@@ -838,9 +838,9 @@ end
 -- The root of all calls.
 -- The root of all calls.
 -----------------------------------------------------------
 -----------------------------------------------------------
 
 
-result = xpcall(love.boot, error_printer)
+local result = xpcall(love.boot, error_printer)
 if not result then return end
 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
 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
 if not result then return end

+ 14 - 13
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,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,
+	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,0x6C,0x6F,0x63,0x61,0x6C,0x20,0x72,0x65,0x73,
 	0x75,0x6C,0x74,0x20,0x3D,0x20,0x78,0x70,0x63,0x61,0x6C,0x6C,0x28,0x6C,0x6F,
 	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,
+	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,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,
 	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,
-	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,
+	0x75,0x72,0x6E,0x20,0x65,0x6E,0x64,0x0D,0x0A,
 };
 };
 // [/boot.lua]
 // [/boot.lua]