From 066280cf99c575702ab771e1b0f5319d9c3fcde1 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 22 Oct 2015 03:18:24 -0200 Subject: source-parser: handle \r\n line endings properly --- src/source-parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/source-parser.c b/src/source-parser.c index aee5c23..db0792c 100644 --- a/src/source-parser.c +++ b/src/source-parser.c @@ -144,6 +144,8 @@ blogc_source_parse(const char *src, size_t src_len, blogc_error_t **err) break; case SOURCE_CONTENT_START: + if (c == '\n' || c == '\r') + break; start = current; state = SOURCE_CONTENT; break; -- cgit v1.2.3-18-g5258