Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows: use _snwprintf(), not swprintf()
Drop the _CRT_NON_CONFORMING_SWPRINTFS hack and just use _snwprintf(). It's a long and complicated story but the gist of it is that the MS CRT had a swprintf() function before ISO C did, with a different function prototype to boot: the ISO C one takes a |size| argument, the MS one does not. The function prototype that's exported by mingw and mingw-w64 depends on the mingw version and the _CRT_NON_CONFORMING_SWPRINTFS define. If they don't match up, you get the wrong prototype and things will crash at run-time. Reduce the phase space by sidestepping the whole issue: drop swprintf() altogether and use _snwprintf() from now on. Fixes #990.
- Loading branch information