msvcrt: Fix scanf with dashes in scanset.
Signed-off-by: Will Mainio <will.mainio@fastmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
12bc7c0abe
commit
c38102b9b4
|
@ -639,12 +639,12 @@ _FUNCTION_ {
|
||||||
while(*format && (*format != ']')) {
|
while(*format && (*format != ']')) {
|
||||||
/* According to msdn:
|
/* According to msdn:
|
||||||
* "Note that %[a-z] and %[z-a] are interpreted as equivalent to %[abcde...z]." */
|
* "Note that %[a-z] and %[z-a] are interpreted as equivalent to %[abcde...z]." */
|
||||||
if((*format == '-') && (*(format + 1) != ']')) {
|
if(format[1] == '-' && format[2] && format[2] != ']') {
|
||||||
if ((*(format - 1)) < *(format + 1))
|
if (format[0] < format[2])
|
||||||
RtlSetBits(&bitMask, *(format - 1) +1 , *(format + 1) - *(format - 1));
|
RtlSetBits(&bitMask, format[0], format[2] - format[0] + 1);
|
||||||
else
|
else
|
||||||
RtlSetBits(&bitMask, *(format + 1) , *(format - 1) - *(format + 1));
|
RtlSetBits(&bitMask, format[2], format[0] - format[2] + 1);
|
||||||
format++;
|
format += 2;
|
||||||
} else
|
} else
|
||||||
RtlSetBits(&bitMask, *format, 1);
|
RtlSetBits(&bitMask, *format, 1);
|
||||||
format++;
|
format++;
|
||||||
|
|
Loading…
Reference in New Issue