Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180111020246.GG1627@brightrain.aerifal.cx>
Date: Wed, 10 Jan 2018 21:02:46 -0500
From: Rich Felker <dalias@...c.org>
To: Peter Wang <novalazy@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: alternative form flag with zero octal value

On Thu, Jan 11, 2018 at 11:43:05AM +1100, Peter Wang wrote:
> Hi,
> 
> I'm not certain it is a bug, but this program produces "00" instead of "0":
> 
>     #include <stdio.h>
>     int main(void)
>     {
>         printf("%#o\n", 0);
>         return 0;
>     }
> 
> Please Cc: any replies as I am not subscribed to this list.

Indeed, this is a bug. I'm not sure whether it was introduced in
commit 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 or already present,
but it was not present in Dmitry Levin's original more complex version
of the patch. I'm going to essentially revert this commit and replace
it with an alternate one-line fix using infrastructure that wasn't
available at the time but added later in commit
167dfe9672c116b315e72e57a55c7769f180dffa.

Thanks for the report.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.