mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
fix fatal error caused by some unicode characters
This commit is contained in:
parent
c75f6e4e67
commit
698d02ceba
1 changed files with 4 additions and 1 deletions
|
|
@ -83,7 +83,10 @@ void Font::draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle
|
||||||
}
|
}
|
||||||
uint charpage = c >> 8;
|
uint charpage = c >> 8;
|
||||||
if (charpage == page){
|
if (charpage == page){
|
||||||
Texture* texture = pages[charpage].get();
|
Texture* texture = nullptr;
|
||||||
|
if (charpage < pages.size()) {
|
||||||
|
texture = pages[charpage].get();
|
||||||
|
}
|
||||||
if (texture == nullptr){
|
if (texture == nullptr){
|
||||||
texture = pages[0].get();
|
texture = pages[0].get();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue