diff options
Diffstat (limited to 'lib/printf/printfcommon.h')
| -rw-r--r-- | lib/printf/printfcommon.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/printf/printfcommon.h b/lib/printf/printfcommon.h index b3a7ca0c13..f777be8805 100644 --- a/lib/printf/printfcommon.h +++ b/lib/printf/printfcommon.h @@ -68,7 +68,7 @@ io_print(struct io_state *iop, const CHAR * __restrict ptr, size_t len) { size_t copylen = len; - if (!iop->cb) + if (!iop->cb || !len) return 0; if (iop->avail < copylen) copylen = iop->avail; |
