aboutsummaryrefslogtreecommitdiffstats
path: root/src/source-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-22 03:18:24 -0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-22 03:18:24 -0200
commit066280cf99c575702ab771e1b0f5319d9c3fcde1 (patch)
tree13f5893de3258654085b1e58dac8f339d370e8c8 /src/source-parser.c
parent908fc8266ef81f80964be710dd5a15dbdb86500f (diff)
downloadblogc-066280cf99c575702ab771e1b0f5319d9c3fcde1.tar.gz
blogc-066280cf99c575702ab771e1b0f5319d9c3fcde1.tar.bz2
blogc-066280cf99c575702ab771e1b0f5319d9c3fcde1.zip
source-parser: handle \r\n line endings properly
Diffstat (limited to 'src/source-parser.c')
-rw-r--r--src/source-parser.c2
1 files changed, 2 insertions, 0 deletions
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;