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:
whitequark 2015-03-25 01:48:17 +03:00
parent 024a26bf57
commit 62af550c0b

View File

@ -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;
}