Fix #1211353 for -ve enum values

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7248 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-06-02 21:46:08 +00:00
commit 388fbad517
3 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@
}
public static $javaclassname swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValues[swigValue].swigValue == swigValue)
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)