Web lists-archives.org

[Mingw-users] snprintf() changes with mingw-runtime-3.14




Hi,
The demo script:

-------------------------------------
#include <stdio.h>

int main(void) {
char buffer[50];
double x = 1.02;

snprintf(buffer, 14, "[%011.7f]\n", x);
printf("%s\n", buffer);

return 0;
}
-------------------------------------

With mingw-runtime-3.13 that outputs:

[001.0200000]

With mingw-runtime-3.14 that outputs:

[  1.0200000]

Leading zeroes have been replaced by spaces. Why the change ?

Cheers,
Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users