text/ttf: fixed all memory violations.

This commit is contained in:
Hermet Park 2023-12-28 18:12:39 +09:00 committed by Hermet Park
parent e62a8668e7
commit 97f41b4ad5
2 changed files with 2 additions and 1 deletions

View file

@ -149,7 +149,7 @@ static uint32_t* _codepoints(const char* text, size_t n)
return nullptr;
}
}
utf32[i] = 0; //end of the unicdoe
utf32[i - 1] = 0; //end of the unicdoe
return utf32;
}

View file

@ -45,6 +45,7 @@ struct Text::Impl
~Impl()
{
free(utf8);
LoaderMgr::retrieve(loader);
delete(paint);
}