Fix try..catch clauses dealing with C strings.
On *nix, a thrown string literal cannot be caught using catch(char*), resulting in crashes.
This commit is contained in:
parent
024a26bf57
commit
62af550c0b
|
@ -579,8 +579,8 @@ bool TtfFont::LoadFontFromFile(bool nameOnly) {
|
|||
fseek(fh, glyfAddr + glyphOffsets[i], SEEK_SET);
|
||||
LoadGlyph(i);
|
||||
}
|
||||
} catch (char *s) {
|
||||
dbp("failed: '%s'", s);
|
||||
} catch (const char *s) {
|
||||
dbp("ttf: file %s failed: '%s'", fontFile, s);
|
||||
fclose(fh);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user