mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
r=pedemonte, a=blizzard Using sscanf to parse font causes problems with whitespace - use something else
This commit is contained in:
parent
01c76373c3
commit
42e06f4c42
@ -452,10 +452,19 @@ nsresult GetSysFontInfo(nsSystemAttrID anID, nsFont* aFont)
|
||||
} // switch
|
||||
|
||||
int pointSize;
|
||||
char szFacename[FACESIZE];
|
||||
char *szFacename;
|
||||
|
||||
sscanf( szFontNameSize, "%d.%s", &pointSize, szFacename);
|
||||
pointSize = atoi(szFontNameSize);
|
||||
|
||||
szFacename = strchr(szFontNameSize, '.');
|
||||
szFacename++;
|
||||
|
||||
#ifdef OLDCODE
|
||||
PRUnichar name[FACESIZE];
|
||||
name[0] = 0;
|
||||
MultiByteToWideChar(0, szFacename,
|
||||
strlen(szFacename) + 1, name, sizeof(name)/sizeof(name[0]));
|
||||
#endif
|
||||
aFont->name.AssignWithConversion(szFacename);
|
||||
|
||||
// Do Style
|
||||
|
Loading…
Reference in New Issue
Block a user