On Tue, Aug 02, 2005 at 10:35:59PM +0900, Mike McCormack wrote:
It's a little more complicated than you think, after you start handling all the width modifiers, various floating point formats, etc.
Not to mention coding in the 'brokenness'! On windows: _snprintf(buff, 3, "ab" ) returns 2, buff = "ab<0>" _snprintf(buff, 3, "abcd" ) returns -1, buff = "ab<0>" but: _snprintf(buff, 3, "abc" ) returns 3, buff = "abc" without NUL terminating the string.
Do you replicate that?
David