]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix another GCC warning
authorPo Lu <luangruo@yahoo.com>
Sat, 29 Oct 2022 10:21:51 +0000 (18:21 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 29 Oct 2022 10:22:28 +0000 (18:22 +0800)
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Fix
another compiler warning.

src/nsterm.m

index e70463b9877214f647d906412daaed92839bb17f..17f40dc7e373c9b22fe4158e1a9e258d48c71d0a 100644 (file)
@@ -4242,7 +4242,7 @@ ns_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
 #else
       enum { PACIFY_GCC_BUG_81401 = 0 };
 #endif
-      char buf[7 + PACIFY_GCC_BUG_81401];
+      char buf[8 + PACIFY_GCC_BUG_81401];
       char *str = NULL;
       int len = glyph->u.glyphless.len;
 
@@ -4268,7 +4268,7 @@ ns_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
        {
          unsigned int ch = glyph->u.glyphless.ch;
          eassume (ch <= MAX_CHAR);
-         snprintf (buf, 7, "%0*X", ch < 0x10000 ? 4 : 6, ch);
+         snprintf (buf, 8, "%0*X", ch < 0x10000 ? 4 : 6, ch);
          str = buf;
        }