Re: There is a bug on sprintf newlib when using specifier %-*.llu
ng boon khai <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <KL1PR0601MB3671C0DE474ACE2A650E7BB0CDE00@KL1PR0601MB3671.apcprd06.prod.outlook.com> |
i'm using new lib version #define _NEWLIB_VERSION "3.1.0" ________________________________ From: ng boon khai Sent: Saturday, March 7, 2020 4:30 PM To: [email protected] <[email protected]> Subject: There is a bug on sprintf newlib when using specifier %-*.llu Hi, I found a bug when using the newlib sprinf using the spcifier %-*.llu Below is the code snippet function (){ int64_t longval; longval=(int64_t)(1); char comparebuf[2000]; sprintf(comparebuf, "testing string! arg1=%-*.llu, arg2=%-*.llu",1,longval,1,longval); printf(comparebuf); } And i get this outcome testing string! arg1=499644, arg2= Expected outcome should be testing string! arg1=1, arg2=1 Regards, Ng Boon Khai.