Skip to content

Commit

Permalink
Merge pull request cinder#2273 from totalgee/fix_console_crash_2272
Browse files Browse the repository at this point in the history
Fix mysterious console logging crash
  • Loading branch information
andrewfb authored Feb 10, 2022
2 parents e83f5bb + 684f344 commit e323be4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cinder/msw/CinderMsw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ HRESULT STDMETHODCALLTYPE ComOStream::Seek( LARGE_INTEGER liDistanceToMove, DWOR
std::wstring toWideString( const std::string &utf8String )
{
int wideSize = ::MultiByteToWideChar( CP_UTF8, 0, utf8String.c_str(), -1, NULL, 0 );
if( wideSize == ERROR_NO_UNICODE_TRANSLATION ) {
throw Exception( "Invalid UTF-8 sequence." );
}
else if( wideSize == 0 ) {
if( wideSize == 0 ) {
throw Exception( "Error in UTF-8 to UTF-16 conversion." );
}

Expand Down

0 comments on commit e323be4

Please sign in to comment.