From fb8f12c6cf62eb2975112001809df6174283284b Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Fri, 28 Jan 2005 17:34:40 +0000 Subject: [PATCH] Fixed bug with signed/unsigned char. --- vmime/parserHelpers.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmime/parserHelpers.hpp b/vmime/parserHelpers.hpp index c444b6fc..2830e1c6 100644 --- a/vmime/parserHelpers.hpp +++ b/vmime/parserHelpers.hpp @@ -63,7 +63,8 @@ inline const char_t tolower(const char_t c) inline const bool isascii(const char_t c) { - return (c <= 127); + const unsigned int x = static_cast (c); + return (x <= 127); } @@ -71,7 +72,8 @@ inline const bool isascii(const char_t c) inline const bool isprint(const char_t c) { - return (c >= 0x20 && c <= 0x7E); + const unsigned int x = static_cast (c); + return (x >= 0x20 && x <= 0x7E); }