wxFile::Read shows debug message when pBuf == NULL even if nCount == 0
|Reported by:||trivia21||Owned by:|
file.Read(NULL, 0) displays a debug message saying pBuf == NULL. I think it should work with any pointer if nCount == 0, because this way it would be easier to write "generic" code that works just the same with all nCount values. Now you have to check for nCount == 0 first each time it isn't hard-coded.
An example of this usage: it's quite reasonable from a MemoryBuffer object to return NULL if I request a buffer size of 0. Now it would be nice if I could use file.Read(membuf.GetBuffer(size), size), and didn't have to check the value of 'size' first.