Fix rabin2 -z regression

This commit is contained in:
pancake 2014-11-05 09:46:11 +01:00
parent 3d3c5a3a14
commit b158a7a63b
2 changed files with 3 additions and 2 deletions

View File

@ -153,7 +153,7 @@ static int string_scan_range (RList *list, const ut8 *buf, int min, const ut64 f
break;
}
} else {
rc = r_utf8_decode (buf+needle, needle-to, &r);
rc = r_utf8_decode (buf+needle, to-needle, &r);
if (rc > 1) str_type = R_STRING_TYPE_UTF8;
}

View File

@ -895,7 +895,8 @@ R_API int r_str_ansi_len(const char *str) {
R_API int r_str_nlen(const char *str, int n) {
int len = 0;
if (str) {
while (IS_PRINTABLE (*str) && n>0) {
//while (IS_PRINTABLE (*str) && n>0) {
while (*str && n>0) {
len++;
str++;
n--;