Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7259 in orxonox.OLD for trunk/src/lib/parser/cmdline_parser


Ignore:
Timestamp:
Mar 30, 2006, 2:41:16 PM (19 years ago)
Author:
rennerc
Message:

fixed a bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/parser/cmdline_parser/cmdline_parser.cc

    r7256 r7259  
    112112          return false;
    113113       
    114         i += it->numArgs + 1;
     114        i += it->numArgs;
    115115       
    116116        if ( finish )
     117        {
     118          i++;
    117119          break;
     120        }
    118121        else
    119         {
     122        { 
    120123          assert( it->numArgs == 0 );
    121124        }
     
    162165    else
    163166    {
    164       if ( arg.length() != 2 && entry.numArgs != 0 )
    165       {
    166         PRINTF(1)("using multiple flags together is only alowed if none needs an arugument. %s needs %d arguments\n", entry.shortOption, entry.numArgs);
     167      if ( arg.find(entry.shortOption) != std::string::npos && arg.length() != 2 && entry.numArgs != 0 )
     168      {
     169        PRINTF(1)("using multiple flags together is only alowed if none needs an arugument. %c needs %d arguments\n", entry.shortOption, entry.numArgs);
     170        //FIXME find beter solution
     171        exit(1);
    167172        return false;
    168173      }
Note: See TracChangeset for help on using the changeset viewer.