bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor bug in *wscanf in 2.2.4


From: Ulrich Drepper
Subject: Re: Minor bug in *wscanf in 2.2.4
Date: 26 Feb 2002 10:08:33 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (asparagus)

Jason Merrill <address@hidden> writes:

> In the following testcase, swscanf should return '0', as the scanset does
> not match any of the input characters.  Instead, it returns 1 and sets
> buf[0] to 0.  The non-wide *scanf functions do not seem to have this bug.

Yes, this is a bug.  I've fixed it now.  Thanks.

But your program is buggy, too:

>   wchar_t buf[10];
>   return swscanf (L"foo", L"%[q]", buf);

Either you make the aray of type char or change the format to L"%l[q]".

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]