[gnome-text-editor] enchant: fix typo from char/uint switch



commit 33dbece88b24f8d0e8254519bb0ca0a0183d458e
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 30 20:06:06 2021 -0700

    enchant: fix typo from char/uint switch

 src/enchant/editor-enchant-spell-provider.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/enchant/editor-enchant-spell-provider.c b/src/enchant/editor-enchant-spell-provider.c
index d228c73..b9f20ff 100644
--- a/src/enchant/editor-enchant-spell-provider.c
+++ b/src/enchant/editor-enchant-spell-provider.c
@@ -61,8 +61,8 @@ get_display_name (const char *code)
       UErrorCode status = U_ZERO_ERROR;
 
       ret[0] = 0;
-      uloc_getDisplayName (code, names[i], ret, sizeof ret, &status);
-      ret[sizeof ret-1] = 0;
+      uloc_getDisplayName (code, names[i], ret, G_N_ELEMENTS (ret), &status);
+      ret[G_N_ELEMENTS (ret)-1] = 0;
 
       if (status == U_ZERO_ERROR && ret[0] != 0)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]