Bug fix: string.find() was ignoring its 4th argument.

This commit is contained in:
Ian Farmer
2009-04-27 22:42:50 +00:00
parent fbaeec9fe7
commit d6cbf423a3

View File

@@ -756,7 +756,7 @@ public class StringLib extends LFunction {
init = Math.max( 0, s.length() + init ); init = Math.max( 0, s.length() + init );
} }
boolean fastMatch = find && ( vm.toboolean( 5 ) || pat.indexOfAny( SPECIALS ) == -1 ); boolean fastMatch = find && ( vm.toboolean( 4 ) || pat.indexOfAny( SPECIALS ) == -1 );
if ( fastMatch ) { if ( fastMatch ) {
int result = s.indexOf( pat, init ); int result = s.indexOf( pat, init );