diff options
author | gildea <empty> | 1992-03-26 17:38:18 +0000 |
---|---|---|
committer | gildea <empty> | 1992-03-26 17:38:18 +0000 |
commit | 06e897c3042c5a0db8b038e0d50b01824e1918fa (patch) | |
tree | 93d676349ef403cbd901be6136b21e9ad194d95f /xc/lib/font | |
parent | 904c75a45f3b16946377837efc2bbdf84542e465 (diff) |
in bdfGetPropertyValue, don't return atom None for empty string.
Close XBUG #5087.
Diffstat (limited to 'xc/lib/font')
-rw-r--r-- | xc/lib/font/bitmap/bdfutils.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xc/lib/font/bitmap/bdfutils.c b/xc/lib/font/bitmap/bdfutils.c index f6cee44d9..202840893 100644 --- a/xc/lib/font/bitmap/bdfutils.c +++ b/xc/lib/font/bitmap/bdfutils.c @@ -22,7 +22,7 @@ SOFTWARE. ************************************************************************/ -/* $XConsortium: bdfutils.c,v 1.3 91/07/17 20:43:53 rws Exp $ */ +/* $XConsortium: bdfutils.c,v 1.4 92/03/16 20:58:35 keith Exp $ */ #include <ctype.h> @@ -142,13 +142,14 @@ bdfGetPropertyValue(s) { register char *p, *pp; + char *orig_s = s; Atom atom; /* strip leading white space */ while (*s && (*s == ' ' || *s == '\t')) s++; if (*s == 0) { - return None; + return bdfForceMakeAtom(s, NULL); } if (*s != '"') { pp = s; @@ -167,11 +168,7 @@ bdfGetPropertyValue(s) if (*s == '"') { if (*(s + 1) != '"') { *p++ = 0; - if (strlen(pp)) { - atom = bdfForceMakeAtom(pp, NULL); - } else { - atom = None; - } + atom = bdfForceMakeAtom(pp, NULL); xfree(pp); return atom; } else { @@ -181,6 +178,7 @@ bdfGetPropertyValue(s) *p++ = *s++; } xfree (pp); + bdfError("unterminated quoted string property: %s\n", orig_s); return None; } |