Hugh McMaster hugh.mcmaster@outlook.com writes:
@@ -715,7 +715,7 @@ static char *get_lineA(FILE *fp)
while (next) {
char *p = strpbrk(line, "\r\n");
char *p = strpbrk(line, "\r\n"), *s; if (!p) { size_t len, count;
@@ -741,10 +741,11 @@ static char *get_lineA(FILE *fp) next = p + 1; if (*p == '\r' && *(p + 1) == '\n') next++; *p = 0;
if (p > buf && *(p - 1) == '\\')
if ((s = strchr(line, ':')) && (*(s - 1) == 'x' || *(s - 1) == ')')) {
while (*next == ' ' || *next == '\t') next++;
memmove(p - 1, next, strlen(next) + 1);
s = strchr(s, '\\');
if (!s) return line;
memmove(s, next, strlen(next) + 1);
This looks wrong. I assume it's meant to check for hex() and the like, but this would have to be done in the parser, not in the line reading code. There could just as well be a "hex:" inside a value string for instance.