summaryrefslogtreecommitdiff
path: root/devices
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2023-03-03 20:04:18 +0000
committerKen Sharp <ken.sharp@artifex.com>2023-03-03 20:06:03 +0000
commit85f185871e4a9a03254a45d9a8b59f0b2d934df8 (patch)
tree222fe34b2b0249f16801e37258298d0edd2704c2 /devices
parentdfa956575b0fcd688d7b50050683cf1d07045011 (diff)
downloadghostpdl-85f185871e4a9a03254a45d9a8b59f0b2d934df8.tar.gz
txtwrite & friends - don't attempt to use glyph name after an error
If the font-specific glpyh name function returned an error then the glyph name is not valid, don't attempt to use it!
Diffstat (limited to 'devices')
-rw-r--r--devices/vector/doc_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/devices/vector/doc_common.c b/devices/vector/doc_common.c
index 71d5422d3..9c981a17d 100644
--- a/devices/vector/doc_common.c
+++ b/devices/vector/doc_common.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018-2022 Artifex Software, Inc.
+/* Copyright (C) 2018-2023 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -444,7 +444,7 @@ int txt_get_unicode(gx_device *dev, gs_font *font, gs_glyph glyph, gs_char ch, u
}
}
}
- if (length == 0) {
+ if (code >= 0 && length == 0) {
single_glyph_list_t *sentry = SingleGlyphList;
double_glyph_list_t *dentry = DoubleGlyphList;
treble_glyph_list_t *tentry = TrebleGlyphList;