Changeset 13938 for trunk/FACT++


Ignore:
Timestamp:
05/27/12 12:02:54 (12 years ago)
Author:
tbretz
Message:
Make sure that the section outside of an Execute is properly set to -3 and not overwritten by a saved state.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Readline.cc

    r13899 r13938  
    9999//
    100100Readline::Readline(const char *prgname) :
    101     fMaxLines(500), fLine(0), fLabel(-1), fCompletion(0)
     101    fMaxLines(500), fLine(0), fSection(-3), fLabel(-1), fCompletion(0)
    102102{
    103103    if (This)
     
    10761076        const int save = fSection;
    10771077        Execute(opt, data);
    1078         fSection = save;
    1079         SetSection(save);
     1078        if (save!=-3)
     1079        {
     1080            fSection = save;
     1081            SetSection(save);
     1082        }
    10801083
    10811084        return true;
     
    13991402    }
    14001403
     1404    fCommandLog << "# " << Time() << " - " << name << " (FINISHED[" << fScriptDepth<< "])" << endl;
     1405
     1406    if (--fScriptDepth==0)
     1407        fStopScript = false;
     1408
    14011409    fLabel = -1;
    14021410    fSection = -3;
    14031411    SetSection(-3);
    1404 
    1405     fCommandLog << "# " << Time() << " - " << name << " (FINISHED[" << fScriptDepth<< "])" << endl;
    1406 
    1407     if (--fScriptDepth==0)
    1408         fStopScript = false;
    14091412
    14101413    return rc;
Note: See TracChangeset for help on using the changeset viewer.