aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libfonts_parse_encoding_line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libfonts_parse_encoding_line.c b/libfonts_parse_encoding_line.c
index a4d876b..1c96074 100644
--- a/libfonts_parse_encoding_line.c
+++ b/libfonts_parse_encoding_line.c
@@ -33,7 +33,7 @@ get_string(const char *s, const char **endp)
char *ret;
for (len = 1, p = &s[1]; *p && *p != '\n' && *p != '#'; p++)
- len += (!isblank(*p) || isblank(p[-1]));
+ len += (!isblank(*p) || !isblank(p[-1]));
ret = malloc(len + 1);
if (!ret)
@@ -43,7 +43,7 @@ get_string(const char *s, const char **endp)
for (*r++ = *s++; *s && *s != '\n' && *s != '#'; s++) {
if (!isblank(*s))
*r++ = *s;
- else if (isblank(s[-1]))
+ else if (!isblank(s[-1]))
*r++ = ' ';
}
*r = '\0';