From be5de412228e062e80867e491273b65133ff9a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Mon, 3 Nov 2014 14:17:02 +0100 Subject: [PATCH] Fix char is assumed signed in iri.c Fixed idn-cmd-utf8 and idn-robots-utf8 tests on archs with unsigned char --- src/ChangeLog | 6 ++++++ src/iri.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3cebf5b..5ad7605 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-11-03 Jakub Čajka + + * iri.c (remote_to_utf8): Fixed assumption that char is signed. Fixes + fellowing test case failures idn-cmd-utf8, idn-robots-utf8, if char is + unsigned. + 2014-11-03 Tim Ruehsen * log.c: turn on automatic format check for log_vprintf_internal() diff --git a/src/iri.c b/src/iri.c index e38edc9..11f2bda 100644 --- a/src/iri.c +++ b/src/iri.c @@ -279,7 +279,7 @@ remote_to_utf8 (struct iri *iri, const char *str, const char **new) { const char *p = str; for (p = str; *p; p++) - if (*p < 0) + if (*p < 0 || *p > 127) { *new = strdup (str); return true; -- 1.9.3