The CSV input module supports variable length end-of-line encodings
(either CRLF, or CR, or LF). When a bunch of accumulated text lines got
processed, do skip the corresponding number of characters after the end
of the last processed line.
This fixes one of the issues discussed in bug #635.
if (!p)
return SR_ERR;
*p = '\0';
+ p += strlen(inc->termination);
g_strstrip(in->buf->str);
ret = SR_OK;
g_strfreev(columns);
}
g_strfreev(lines);
- g_string_erase(in->buf, 0, p - in->buf->str + 1);
+ g_string_erase(in->buf, 0, p - in->buf->str);
return ret;
}