mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-06 09:34:15 +03:00
Ensure line lengths cache is created initialised to zero.
This commit is contained in:
parent
b89fb480db
commit
555276b04a
@ -934,10 +934,9 @@ static bool textarea_reflow_multiline(struct textarea *ta,
|
|||||||
assert(ta->flags & TEXTAREA_MULTILINE);
|
assert(ta->flags & TEXTAREA_MULTILINE);
|
||||||
|
|
||||||
if (ta->lines == NULL) {
|
if (ta->lines == NULL) {
|
||||||
ta->lines =
|
ta->lines = calloc(sizeof(struct line_info), LINE_CHUNK_SIZE);
|
||||||
malloc(LINE_CHUNK_SIZE * sizeof(struct line_info));
|
|
||||||
if (ta->lines == NULL) {
|
if (ta->lines == NULL) {
|
||||||
LOG(("malloc failed"));
|
LOG(("Failed to allocate memory for textarea lines"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ta->lines_alloc_size = LINE_CHUNK_SIZE;
|
ta->lines_alloc_size = LINE_CHUNK_SIZE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user