Changeset 533 for cpp/frams


Ignore:
Timestamp:
07/19/16 18:12:13 (8 years ago)
Author:
Maciej Komosinski
Message:
  • Improved error message on superfluous param values
  • Don't call flags(i) for illegal i
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/param/param.cpp

    r523 r533  
    11301130                else
    11311131#ifdef SAVE_SELECTED_NAMES
    1132                         if (!(flags(i)&PARAM_CANOMITNAME))
     1132                        if ((i>=getPropCount()) || !(flags(i)&PARAM_CANOMITNAME))
    11331133#endif
    11341134                        {
    1135                         logPrintf("Param", "load2", LOG_WARN, "Missing property name in '%s' (assuming '%s')",
    1136                                 getName(), id(i) ? id(i) : "unknown property?");
     1135                        if (id(i))
     1136                                logPrintf("Param", "load2", LOG_WARN, "Missing property name in '%s' (assuming '%s')", getName(), id(i));
     1137                        else
     1138                                logPrintf("Param", "load2", LOG_WARN, "Value after the last property of '%s'", getName());
    11371139                        }
    11381140#endif
Note: See TracChangeset for help on using the changeset viewer.