mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 08:43:23 +00:00
rtld snprintf: do not erronously skip a char at the buffer boundary
(cherry picked from commit 56ee5fc43c
)
This commit is contained in:
parent
33cac296a2
commit
44debee9fc
@ -81,11 +81,10 @@ snprintf_func(int ch, struct snprintf_arg *const info)
|
||||
}
|
||||
break;
|
||||
case PRINT_METHOD_WRITE:
|
||||
if (info->remain > 0) {
|
||||
*info->str++ = ch;
|
||||
info->remain--;
|
||||
} else
|
||||
if (info->remain == 0)
|
||||
printf_out(info);
|
||||
*info->str++ = ch;
|
||||
info->remain--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user