From 408557486d6c2522e98c7d551a9cffc0320fd0cc Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Fri, 20 Oct 2023 14:46:15 -0400 Subject: [PATCH] always update state --- utf8proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utf8proc.c b/utf8proc.c index 608e873..98dab52 100644 --- a/utf8proc.c +++ b/utf8proc.c @@ -332,12 +332,11 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, int licb, int tic state_bc = UTF8PROC_BOUNDCLASS_E_ZWG; // state to record emoji+zwg combo else state_bc = tbc; - - *state = state_bc + (state_ibc << 8); } else - *state = tbc; + state_bc = tbc; + *state = state_bc + (state_ibc << 8); return break_permitted; } else