mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
fixed a bug in LuaJ's string.match. hopefully. closes #138
This commit is contained in:
parent
55a90f8b63
commit
6f8bb90f24
@ -1155,7 +1155,7 @@ public class StringLib extends TwoArgFunction {
|
||||
if ( poff == plen || poff + 1 == plen ) {
|
||||
error( "unbalanced pattern" );
|
||||
}
|
||||
if ( s.luaByte( soff ) != p.luaByte( poff ) )
|
||||
if ( soff >= s.length() || s.luaByte( soff ) != p.luaByte( poff ) )
|
||||
return -1;
|
||||
else {
|
||||
int b = p.luaByte( poff );
|
||||
|
Loading…
x
Reference in New Issue
Block a user