{
long l;
- wxStringTokenizer tokenizer(s, wxS(";"));
+ wxStringTokenizer tokenizer(s, wxS(";"), wxTOKEN_RET_EMPTY_ALL);
// first the version
wxString token = tokenizer.GetNextToken();
return false;
lf.lfPitchAndFamily = (BYTE)l;
- token = tokenizer.GetNextToken();
- if(!token)
+ if ( !tokenizer.HasMoreTokens() )
return false;
- wxStrcpy(lf.lfFaceName, token.c_str());
+
+ // the face name may be empty
+ wxStrcpy(lf.lfFaceName, tokenizer.GetNextToken());
return true;
}
lf.lfClipPrecision,
lf.lfQuality,
lf.lfPitchAndFamily,
- (const wxChar*)lf.lfFaceName);
+ lf.lfFaceName);
return s;
}