From 69b0748adaa0f08ade90c6cc0f00e188a22e7c92 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 28 Feb 2013 20:18:26 -0800 Subject: [PATCH] Client/manager: isspace() throws an exception on Win for non-ASCII chars. Check isascii() first. --- lib/parse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/parse.h b/lib/parse.h index 5a8f490108..dd6b3211fb 100644 --- a/lib/parse.h +++ b/lib/parse.h @@ -112,7 +112,7 @@ struct XML_PARSER { while (1) { c = f->_getc(); if (!c || c == EOF) return true; - if (isspace(c)) continue; + if (isascii(c) && isspace(c)) continue; first_char = c; return false; } @@ -173,7 +173,7 @@ struct XML_PARSER { if (attr_buf) *attr_buf = 0; return XML_PARSE_TAG; } - if (isspace(c)) { + if (isascii(c) && isspace(c)) { if (found_space && attr_buf) { if (--attr_len > 0) { *attr_buf++ = c;