Skip to content
Extraits de code Groupes Projets
Valider 9c815d30 rédigé par Rodrigo Braz Monteiro's avatar Rodrigo Braz Monteiro
Parcourir les fichiers

Fixed crashing on loading malformed font files.

Originally committed to SVN as r2479.
parent f22cfa17
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -329,7 +329,7 @@ int AssFile::AddLine (wxString data,wxString group,int lasttime,int &version,wxS ...@@ -329,7 +329,7 @@ int AssFile::AddLine (wxString data,wxString group,int lasttime,int &version,wxS
} }
// Is the filename line? // Is the filename line?
bool isFilename = (data.Left(10) == _T("fontname: ") && lowGroup == _T("[fonts]")) || (data.Left(10) == _T("filename: ") && lowGroup == _T("[graphics]")); bool isFilename = (data.Left(10) == _T("fontname: ") || data.Left(10) == _T("filename: "));
// The attachment file is static, since it is built through several calls to this // The attachment file is static, since it is built through several calls to this
// After it's done building, it's reset to NULL // After it's done building, it's reset to NULL
...@@ -355,7 +355,7 @@ int AssFile::AddLine (wxString data,wxString group,int lasttime,int &version,wxS ...@@ -355,7 +355,7 @@ int AssFile::AddLine (wxString data,wxString group,int lasttime,int &version,wxS
} }
// Valid data? // Valid data?
if (validData) { if (attach && validData) {
// Insert data // Insert data
attach->AddData(data); attach->AddData(data);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter