Correct bug with returning 0 for non-empty input from wxConvAuto::ToWChar().
Since the changes of r63064 we could return 0 when asked to convert a non-empty buffer containing only a BOM. This confused the logic in wxTextInputStream::NextChar() and was generally unexpected so now return wxCONV_FAILED in this case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -107,11 +107,11 @@ private:
|
||||
void InitFromBOM(BOMType bomType);
|
||||
|
||||
// create the correct conversion object for the BOM present in the
|
||||
// beginning of the buffer; adjust the buffer to skip the BOM if found
|
||||
// beginning of the buffer
|
||||
//
|
||||
// return false if the buffer is too short to allow us to determine if we
|
||||
// have BOM or not
|
||||
bool InitFromInput(const char **src, size_t *len);
|
||||
bool InitFromInput(const char *src, size_t len);
|
||||
|
||||
// adjust src and len to skip over the BOM (identified by m_bomType) at the
|
||||
// start of the buffer
|
||||
|
Reference in New Issue
Block a user