Репозитории ALT
S: | 5.1.0.0.213.d04f-alt1 |
5.1: | 3.1.6-alt3 |
4.1: | 3.1.5-alt3 |
4.0: | 3.1.5-alt3 |
3.0: | 3.1.4-alt2 |
Группа :: Работа с текстами
Пакет: gawk
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: gawk-3.1.5-alt-do_match.patch
Скачать
Скачать
--- gawk-3.1.5/builtin.c.orig 2006-12-17 23:51:38 +0000
+++ gawk-3.1.5/builtin.c 2006-12-17 23:56:58 +0000
@@ -2020,7 +2020,7 @@ do_match(NODE *tree)
rlength = REEND(rp, t1->stptr) - RESTART(rp, t1->stptr); /* byte length */
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1) {
+ if (rlength > 0 && gawk_mb_cur_max > 1) {
t1 = str2wstr(t1, & wc_indices);
rlength = wc_indices[rstart + rlength - 1] - wc_indices[rstart] + 1;
rstart = wc_indices[rstart];
@@ -2046,7 +2046,7 @@ do_match(NODE *tree)
subpat_start = s;
subpat_len = len = SUBPATEND(rp, t1->stptr, ii) - s;
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1) {
+ if (len > 0 && gawk_mb_cur_max > 1) {
subpat_start = wc_indices[s];
subpat_len = wc_indices[s + len - 1] - subpat_start + 1;
}