Skip to content

Commit 684f344

Browse files
committed
Fix mysterious console logging crash
- an error would be thrown when trying to log a message to the console that was of length 1113 bytes. - fixes issue #2272.
1 parent e83f5bb commit 684f344

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cinder/msw/CinderMsw.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ HRESULT STDMETHODCALLTYPE ComOStream::Seek( LARGE_INTEGER liDistanceToMove, DWOR
144144
std::wstring toWideString( const std::string &utf8String )
145145
{
146146
int wideSize = ::MultiByteToWideChar( CP_UTF8, 0, utf8String.c_str(), -1, NULL, 0 );
147-
if( wideSize == ERROR_NO_UNICODE_TRANSLATION ) {
148-
throw Exception( "Invalid UTF-8 sequence." );
149-
}
150-
else if( wideSize == 0 ) {
147+
if( wideSize == 0 ) {
151148
throw Exception( "Error in UTF-8 to UTF-16 conversion." );
152149
}
153150

0 commit comments

Comments
 (0)