Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6655


Ignore:
Timestamp:
Mar 29, 2010, 11:27:36 PM (14 years ago)
Author:
rgrieder
Message:

Fixed a bug in LuaState that caused Lua Debugger to malfunction when showing lines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/src/libraries/core/LuaState.cc

    r6629 r6655  
    114114            luaInput = code;
    115115
     116        if (sourceFileInfo != NULL)
     117        {
     118            // Also fill a map with the actual source code. This is just for the include* commands
     119            // where the content of sourceFileInfo->filename doesn't match 'code'
     120            this->sourceCodeMap_[sourceFileInfo->filename] = code;
     121        }
     122
    116123        this->doString(luaInput, sourceFileInfo);
     124
     125        if (sourceFileInfo != NULL)
     126        {
     127            // Delete source code entry
     128            if (sourceFileInfo != NULL)
     129                this->sourceCodeMap_.erase(sourceFileInfo->filename);
     130        }
    117131    }
    118132
     
    140154            // The '@' is a Lua convention to identify the chunk name as filename
    141155            chunkname = '@' + sourceFileInfo->filename;
    142            
    143             // Also fill a map with the actual source code. This is just for the include* commands
    144             // where the content of sourceFileInfo->filename doesn't match 'code'
    145             this->sourceCodeMap_[sourceFileInfo->filename] = code;
    146156        }
    147157        else
     
    184194        // Load the old info again
    185195        sourceFileInfo_ = oldSourceFileInfo;
    186 
    187         // Delete source code entry
    188         if (sourceFileInfo != NULL)
    189             this->sourceCodeMap_.erase(sourceFileInfo->filename);
    190196    }
    191197
Note: See TracChangeset for help on using the changeset viewer.