Revert "Prevent overflow beyond the end of string in textfieldrep()"

This reverts commit 77d8d8d657.
This commit is contained in:
Tatsuya Kinoshita
2016-12-15 22:43:33 +09:00
parent 2aa21dc328
commit 3eab80f2a1

2
form.c
View File

@@ -526,8 +526,6 @@ textfieldrep(Str s, int width)
for (i = 0; i < s->length; i += c_len) {
c_type = get_mctype((unsigned char *)&s->ptr[i]);
c_len = get_mclen(&s->ptr[i]);
if (i + c_len > s->length)
break;
if (s->ptr[i] == '\r')
continue;
k = j + get_mcwidth(&s->ptr[i]);