summaryrefslogtreecommitdiff
path: root/src/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/font.c b/src/font.c
index cb3e9c5d326..ed4da9c75ac 100644
--- a/src/font.c
+++ b/src/font.c
@@ -4492,6 +4492,8 @@ created glyph-string. Otherwise, the value is nil. */)
}
if (i == 3 || XINT (n) == 0)
return Qnil;
+ if (XINT (n) < LGSTRING_GLYPH_LEN (gstring))
+ LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil);
glyph = LGSTRING_GLYPH (gstring, 0);
from = LGLYPH_FROM (glyph);