fix range check in getFields - fixes issue 687

This commit is contained in:
Tom Morris 2013-02-26 16:35:21 -05:00
parent 389e762251
commit 7b3379afc7

View File

@ -253,7 +253,7 @@ public class Recon implements HasFields, Jsonizable {
@Override
public Object getField(String name, Properties bindings) {
int index = s_featureMap.containsKey(name) ? s_featureMap.get(name) : -1;
return (index > 0 && index < features.length) ? features[index] : null;
return (index >= 0 && index < features.length) ? features[index] : null;
}
@Override