1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-16 02:09:42 +00:00

Fix out of bounds access for std::string_view

This commit is contained in:
elsid 2022-02-14 19:56:50 +01:00
parent 72e76ad820
commit 071ab3f650
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -30,6 +30,8 @@ namespace
{
unsigned long utf8ToUnicode(std::string_view utf8)
{
if (utf8.empty())
return 0;
size_t i = 0;
unsigned long unicode;
size_t numbytes;