Changeset 11696:1c9c5bda6959 in orange for source/orange/vars.cpp


Ignore:
Timestamp:
09/12/13 19:36:43 (7 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Check for negative index values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/vars.cpp

    r10960 r11696  
    647647  } 
    648648 
    649   str = val.intV<int(values->size()) ? values->operator[](val.intV) : "#RNGE"; 
     649  if (val.intV < values->size() && val.intV >= 0) { 
     650    str = values->operator[](val.intV); 
     651  } else { 
     652    str = "#RNGE"; 
     653  } 
    650654} 
    651655 
Note: See TracChangeset for help on using the changeset viewer.