AmendHub

Download (as of this amendment):

jcs

/

textview

/

amendments

/

56

TVClear: Reset next_slab pointers


jcs made amendment 56 over 2 years ago
--- textview.c Thu Nov 21 10:47:30 2024 +++ textview.c Thu Nov 21 20:11:53 2024 @@ -697,6 +697,7 @@ TVClear(TVHandle tvh) slab = (struct TVSlab *)*(tv->first_style_slab); memset(slab->data, 0, slab->size); slab->pos = 0; + slab->next_slab = NULL; HUnlock(tv->first_text_slab); tv->cur_style = 0; @@ -714,6 +715,7 @@ TVClear(TVHandle tvh) slab = (struct TVSlab *)*(tv->first_chunk_slab); memset(slab->data, 0, slab->size); slab->pos = 0; + slab->next_slab = NULL; HUnlock(tv->first_chunk_slab); tv->first_chunk = 0; @@ -732,6 +734,7 @@ TVClear(TVHandle tvh) slab = (struct TVSlab *)*(tv->first_text_slab); memset(slab->data, 0, slab->size); slab->pos = 0; + slab->next_slab = NULL; HUnlock(tv->first_text_slab); tv->text_length = 0;