Revert "Prevent overflow beyond the end of string in textfieldrep()"
This reverts commit 77d8d8d657.
			
			
This commit is contained in:
		
							
								
								
									
										2
									
								
								form.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								form.c
									
									
									
									
									
								
							| @@ -526,8 +526,6 @@ textfieldrep(Str s, int width) | |||||||
|     for (i = 0; i < s->length; i += c_len) { |     for (i = 0; i < s->length; i += c_len) { | ||||||
| 	c_type = get_mctype((unsigned char *)&s->ptr[i]); | 	c_type = get_mctype((unsigned char *)&s->ptr[i]); | ||||||
| 	c_len = get_mclen(&s->ptr[i]); | 	c_len = get_mclen(&s->ptr[i]); | ||||||
| 	if (i + c_len > s->length) |  | ||||||
| 	    break; |  | ||||||
| 	if (s->ptr[i] == '\r') | 	if (s->ptr[i] == '\r') | ||||||
| 	    continue; | 	    continue; | ||||||
| 	k = j + get_mcwidth(&s->ptr[i]); | 	k = j + get_mcwidth(&s->ptr[i]); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user