summaryrefslogtreecommitdiff
path: root/lib/sscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sscanf.c')
-rw-r--r--lib/sscanf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sscanf.c b/lib/sscanf.c
index d1e2dc272cc..4c35c035fe1 100644
--- a/lib/sscanf.c
+++ b/lib/sscanf.c
@@ -555,7 +555,8 @@ literal:
if (flags & SUPPRESS) {
size_t sum = 0;
- if ((n = inr) < width) {
+ n = inr;
+ if (n < width) {
sum += n;
width -= n;
inp += n;