mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 22:30:30 +01:00
Upgrade to MicroPython 1.9.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
@@ -485,14 +485,17 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
|
||||
case 's':
|
||||
{
|
||||
const char *str = va_arg(args, const char*);
|
||||
if (str) {
|
||||
if (prec < 0) {
|
||||
prec = strlen(str);
|
||||
}
|
||||
chrs += mp_print_strn(print, str, prec, flags, fill, width);
|
||||
} else {
|
||||
#ifndef NDEBUG
|
||||
// With debugging enabled, catch printing of null string pointers
|
||||
if (prec != 0 && str == NULL) {
|
||||
chrs += mp_print_strn(print, "(null)", 6, flags, fill, width);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (prec < 0) {
|
||||
prec = strlen(str);
|
||||
}
|
||||
chrs += mp_print_strn(print, str, prec, flags, fill, width);
|
||||
break;
|
||||
}
|
||||
case 'u':
|
||||
|
||||
Reference in New Issue
Block a user