Looks like this problem is fixed in the mingw-runtime 3.14. Is it
possible to update Ubuntu package with the latest upstream version?
** Description changed:
- Binary package hint: mingw32
+ Binary package hint: mingw32-runtime
OS: Ubuntu 8.04/AMD64.
- Package: 4.2.1.dfsg-1ubuntu1
+ Package: 3.13-1
Description:
The snprintf library function incorrectly parses the "%lu" format specifier
as "unsigned long long" instead of "unsigned long" resulting in incorrect value
formatting.
Example:
#include <stdio.h>
int main() {
char buf[256];
snprintf(buf, 256, "%lu", (size_t)12345678);
printf(buf);
return 0;
}
Prints:
9151369040453460302
Instead of:
12345678
Other functions like printf and sprintf do work fine.
Native Linux GCC compiler version 4.2.3 produces correct code in both 32 and
64 mode.
When replacing (size_t) with (unsigned long long) the above code works fine
also in mingw32.
--
Inconsistent snprintf format specification parsing
https://bugs.launchpad.net/bugs/221979
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs