diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.c b/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.c index ce15a2b571..65528353a6 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stdio.c @@ -256,7 +256,7 @@ vsscanf (const char *buf, const char *s, va_list ap) else if (*s == 'l' || *s == 'L') lflag = 1; else if (*s >= '1' && *s <= '9') { - for (tc = s; isdigit (*s); s++); + for (tc = s; isdigit ((unsigned)(*s)); s++); strncpy (tmp, tc, s - tc); tmp[s - tc] = '\0'; atob (&width, tmp, 10);