소스 검색

minor fix for previous commit

Nicolas Cannasse 6 년 전
부모
커밋
fe06f65afe
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/std/bytes.c

+ 1 - 1
src/std/bytes.c

@@ -124,7 +124,7 @@ HL_PRIM int hl_bytes_rfind( vbyte *where, int len, vbyte *which, int wlen ) {
 	if( wlen > len ) return -1;
 	if( wlen == 0 ) return len; // at end
 	int pos = len - wlen;
-	while( pos > 0 ) {
+	while( pos >= 0 ) {
 		if( memcmp(where+pos,which,wlen) == 0 )
 			return pos;
 		pos--;