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);
|
fseek(fh, glyfAddr + glyphOffsets[i], SEEK_SET);
|
||||||
LoadGlyph(i);
|
LoadGlyph(i);
|
||||||
}
|
}
|
||||||
} catch (char *s) {
|
} catch (const char *s) {
|
||||||
dbp("failed: '%s'", s);
|
dbp("ttf: file %s failed: '%s'", fontFile, s);
|
||||||
fclose(fh);
|
fclose(fh);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user