diff --git a/features/minimal-printf/mbed_printf_implementation.c b/features/minimal-printf/mbed_printf_implementation.c index 4b8cd1a4ac..eca418ae17 100644 --- a/features/minimal-printf/mbed_printf_implementation.c +++ b/features/minimal-printf/mbed_printf_implementation.c @@ -436,7 +436,7 @@ int mbed_minimal_formatted_string(char* buffer, size_t length, const char* forma /* ensure that function wasn't called with an empty buffer, or with or with a buffer size that is larger than the maximum 'int' value, or with a NULL format specifier */ - if (format && length >= 0 && length <= INT_MAX) + if (format && length <= INT_MAX) { /* Make sure that there's always space for the NULL terminator */ if (length > 0)