Yet Another MFC Bug
Feb. 21st, 2008 06:12 pmThis is cute. In Visual Studio 2005, if you use CString::FormatMessage() in a way that generates an empty string, it throws a CMemoryException indicating that you're out of memory. Hilarity ensues.
What you should get is a nice harmless null-terminated empty string.
And maybe you do in Visual Studio 2008. But I'm not holding my breath.
What you should get is a nice harmless null-terminated empty string.
And maybe you do in Visual Studio 2008. But I'm not holding my breath.
no subject
Date: 2008-02-24 12:15 pm (UTC)no subject
Date: 2008-02-24 05:44 pm (UTC)This is why I acknowledged in the bug report that it certainly seemed like a strange thing to do, but that since the format string and the argument had been selected from variables, it wasn't something that was particularly easy for me to detect and prevent.