Explicitly pop the reader-limit in to_titlecase() - libgrapheme - unicode strin… | |
git clone git://git.suckless.org/libgrapheme | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 657e9379807b215593e8c0706a51872b7870e8fe | |
parent a1913f83b643e883aa6754d8078aee7d46f53aec | |
Author: Laslo Hunhold <[email protected]> | |
Date: Sat, 8 Oct 2022 13:17:47 +0200 | |
Explicitly pop the reader-limit in to_titlecase() | |
This ensures that we don't have any stray limits on the stack and | |
always have a clean state. | |
Signed-off-by: Laslo Hunhold <[email protected]> | |
Diffstat: | |
M src/case.c | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/case.c b/src/case.c | |
@@ -185,12 +185,14 @@ to_titlecase(HERODOTUS_READER *r, HERODOTUS_WRITER *w) | |
if (s == HERODOTUS_STATUS_END_OF_BUFFER) { | |
/* we are done */ | |
+ herodotus_reader_pop_limit(r); | |
break; | |
} else if (s == HERODOTUS_STATUS_SOFT_LIMIT_REACHED) { | |
/* | |
* we did not encounter any cased character | |
* up to the word break | |
*/ | |
+ herodotus_reader_pop_limit(r); | |
continue; | |
} else { | |
/* |