4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-04 05:20:26 +08:00
Corinna Vinschen 9638c07527 newlib: vf[w]scanf: Drop width computation mixup
The width value keeps the maximum field width.  This is the maximum
field width of the *input*.  It's *never* to be used in conjunction
with the number of bytes or characters written to the output argument.

However, especially in vfwscanf, the code is partially taken from
NetBSD which erroneously subtracts the number of multibyte chars
written to the argument from the width variable, thus potentially
subtracting up to MB_CUR_MAX from width for a single character in
the input stream.

To make matters worse, the previous patch adding %m added basically
the same mistake for 'c' type input.

Fix it.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 13:47:26 +01:00
..
2016-07-04 17:13:55 +01:00
2017-12-01 03:41:50 -06:00
2016-07-04 17:13:55 +01:00
2017-12-01 03:41:50 -06:00
2017-12-01 03:41:50 -06:00
2017-12-01 03:41:50 -06:00
2017-12-01 03:41:50 -06:00
2017-12-01 03:41:50 -06:00
2017-12-01 03:41:51 -06:00
2017-12-01 03:41:51 -06:00
2017-12-01 03:41:51 -06:00
2017-12-01 03:41:51 -06:00
2017-12-01 03:41:52 -06:00
2017-12-01 03:41:52 -06:00
2017-12-01 03:41:52 -06:00
2016-07-04 17:13:55 +01:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2016-07-04 17:13:55 +01:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:46 -06:00