mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -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 ) {
|
if ( poff == plen || poff + 1 == plen ) {
|
||||||
error( "unbalanced pattern" );
|
error( "unbalanced pattern" );
|
||||||
}
|
}
|
||||||
if ( s.luaByte( soff ) != p.luaByte( poff ) )
|
if ( soff >= s.length() || s.luaByte( soff ) != p.luaByte( poff ) )
|
||||||
return -1;
|
return -1;
|
||||||
else {
|
else {
|
||||||
int b = p.luaByte( poff );
|
int b = p.luaByte( poff );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user