update slice test code.
This commit is contained in:
parent
3b62d988d8
commit
65a4b5e828
@ -829,7 +829,7 @@ static int lbytearr_slice( lua_State *L )
|
||||
handle_scope_except();
|
||||
|
||||
Buf *r;
|
||||
if( start > end || getLength(p) <= start ){ // empty array
|
||||
if( end < 0 || start > end || (int)getLength(p) <= start ){ // empty array
|
||||
r = createBuf( BYTEARRAY_RESERVE_SIZE, getNativeEndian() );
|
||||
}
|
||||
else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user