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;