Skip to content
Permalink
Browse files

fixed uncaught exeption (which only a static analyser finds and likel…

…y never occurs)
  • Loading branch information
turleypol committed Jan 9, 2020
1 parent 6c06c13 commit d004f9d2a6bf9e895aacb3c4f6395d51adaaf1c0
Showing with 2 additions and 2 deletions.
  1. +2 −2 pol-core/bscript/str.cpp
@@ -1126,7 +1126,7 @@ bool String::hasUTF8Characters( const std::string& str )
std::vector<unsigned short> String::toUTF16() const
{
std::vector<unsigned short> u16;
utf8::utf8to16( value_.begin(), value_.end(), std::back_inserter( u16 ) );
utf8::unchecked::utf8to16( value_.begin(), value_.end(), std::back_inserter( u16 ) );
return u16;
}

@@ -1192,7 +1192,7 @@ std::vector<unsigned short> String::toUTF16( const std::string& text )
std::vector<unsigned short> utf16;
if ( text.empty() )
return utf16;
utf8::utf8to16( text.begin(), text.end(), std::back_inserter( utf16 ) );
utf8::unchecked::utf8to16( text.begin(), text.end(), std::back_inserter( utf16 ) );
return utf16;
}

0 comments on commit d004f9d

Please sign in to comment.
You can’t perform that action at this time.