From c95ee19c5939882ade312ee3bfacbd3c64edee7c Mon Sep 17 00:00:00 2001 From: Havard Eidnes Date: Thu, 12 Feb 2015 15:13:00 +0100 Subject: [PATCH] Fix a toupper() usage too to avoid negative signed chars. --- src/units.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/units.c b/src/units.c index 584b048..ed1ea60 100644 --- a/src/units.c +++ b/src/units.c @@ -58,6 +58,7 @@ #include #endif #include +#include #include #include @@ -261,7 +262,7 @@ extern "C" { inNum *= 8; } - switch (toupper(inFormat)) + switch (toupper((u_char)inFormat)) { case 'B': conv = UNIT_CONV;