Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 28, 2010, 10:46:07 PM (15 years ago)
Author:
rgrieder
Message:

Fixed LuaState::doFile return value issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/data/lua/LuaStateInit.lua

    r6628 r6629  
    3434-- Furthermore the ".lua" extension is appended to the moduleName parameter when looking for the file
    3535original_require = require
     36_REQUIREDNAME = ""
     37LuaStateReturnValue = true
    3638require = function(moduleName)
    3739  if not luaState:fileExists(moduleName .. ".lua") then
     
    4446  if not _LOADED[moduleName] then
    4547    -- save old value
    46     _REQUIREDNAME_OLD = _REQUIREDNAME
     48    local _REQUIREDNAME_OLD = _REQUIREDNAME
    4749    _REQUIREDNAME = moduleName
    4850    luaState:doFile(moduleName .. ".lua")
    49     _LOADED[moduleName] = LuaStateReturnValue or true
     51    _LOADED[moduleName] = LuaStateReturnValue
    5052    -- restore old value
    5153    _REQUIREDNAME = _REQUIREDNAME_OLD
Note: See TracChangeset for help on using the changeset viewer.