aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/reader.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 6947032d..b1cb13af 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ serd (0.29.2) unstable;
* Support strict parsing of prefixed names
* Report errors for prematurely terminated statements
+ * Fix building with MSVC
-- David Robillard <d@drobilla.net> Mon, 28 Aug 2017 12:39:47 +0200
diff --git a/src/reader.c b/src/reader.c
index f1b445b9..65fd38f7 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -166,7 +166,7 @@ eat_string(SerdReader* reader, const char* str, unsigned n)
{
bool bad = false;
for (unsigned i = 0; i < n; ++i) {
- bad |= eat_byte_check(reader, ((const uint8_t*)str)[i]);
+ bad |= (bool)eat_byte_check(reader, ((const uint8_t*)str)[i]);
}
return bad;
}
@@ -649,8 +649,9 @@ read_PN_CHARS_BASE(SerdReader* reader, Ref dest)
eat_byte_safe(reader, c)))) {
return st;
} else if (reader->strict && !is_PN_CHARS_BASE(code)) {
- return r_err(reader, SERD_ERR_BAD_SYNTAX,
- "invalid character U+%04X in name\n", code);
+ r_err(reader, SERD_ERR_BAD_SYNTAX,
+ "invalid character U+%04X in name\n", code);
+ return SERD_ERR_BAD_SYNTAX;
}
return st;
}