1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00

better fix for iconv_substr

This commit is contained in:
Stanislav Malyshev
2007-09-20 22:35:24 +00:00
parent fa0efe45e0
commit 7985002fc6
+6 -1
View File
@@ -700,7 +700,12 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval,
}
}
if (offset >= total_len || len > total_len) {
if(len > total_len) {
len = total_len;
}
if (offset >= total_len) {
return PHP_ICONV_ERR_SUCCESS;
}