summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/include/nolibc/stdio.h')
-rw-r--r--tools/include/nolibc/stdio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index c470d334ef3f..7630234408c5 100644
--- a/tools/include/nolibc/stdio.h
+++ b/tools/include/nolibc/stdio.h
@@ -358,11 +358,11 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
n -= w;
while (width-- > w) {
if (cb(state, " ", 1) != 0)
- break;
+ return -1;
written += 1;
}
if (cb(state, outstr, w) != 0)
- break;
+ return -1;
}
written += len;