diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1483,6 +1483,7 @@ str_utf8_nth(const char *p, const char *e, long nth) } while (s < t && (int)sizeof(VALUE) <= nth); p = (char *)s; } + if (p > e) return 0; while (p < e) { if (is_utf8_lead_byte(*p)) { if (nth == 0) break; |