[hackers] [libgrapheme] Explicitly cast to uint_least8_t when storing property in state || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Sat, 8 Jan 2022 16:46:14 +0100 (CET)

commit 227eb47be678aaea70b095048c4d29f82a137d51
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Sat Jan 8 16:45:47 2022 +0100
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Sat Jan 8 16:45:47 2022 +0100

    Explicitly cast to uint_least8_t when storing property in state
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/src/character.c b/src/character.c
index 462e572..1ca94d0 100644
--- a/src/character.c
+++ b/src/character.c
_AT_@ -128,7 +128,7 @@ grapheme_is_character_break(uint_least32_t cp0, uint_least32_t cp1, GRAPHEME_STA
                 cp1_prop = get_break_prop(cp1);
 
                 /* preserve prop of right codepoint for next iteration */
- state->prop = cp1_prop;
+ state->prop = (uint_least8_t)cp1_prop;
                 state->prop_set = true;
 
                 /* update flags */
Received on Sat Jan 08 2022 - 16:46:14 CET

This archive was generated by hypermail 2.3.0 : Sat Jan 08 2022 - 16:48:31 CET