mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
sfnt2fon: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
This commit is contained in:
parent
b5b7d35600
commit
37307535a2
Notes:
Alexandre Julliard
2024-09-19 23:03:14 +02:00
Approved-by: Rémi Bernon (@rbernon) Approved-by: Huw Davies (@huw) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6524
1 changed files with 7 additions and 4 deletions
|
@ -881,12 +881,15 @@ int main(int argc, char **argv)
|
|||
name = get_face_name( info[i] );
|
||||
fontdir_len += 0x74 + strlen(name) + 1;
|
||||
if(i == 0) {
|
||||
sprintf(non_resident_name, "FONTRES 100,%d,%d : %s %d",
|
||||
info[i]->hdr.fi.dfVertRes, info[i]->hdr.fi.dfHorizRes,
|
||||
name, info[i]->hdr.fi.dfPoints );
|
||||
snprintf(non_resident_name, sizeof(non_resident_name),
|
||||
"FONTRES 100,%d,%d : %s %d",
|
||||
info[i]->hdr.fi.dfVertRes, info[i]->hdr.fi.dfHorizRes,
|
||||
name, info[i]->hdr.fi.dfPoints );
|
||||
strcpy(resident_name, name);
|
||||
} else {
|
||||
sprintf(non_resident_name + strlen(non_resident_name), ",%d", info[i]->hdr.fi.dfPoints );
|
||||
snprintf(non_resident_name + strlen(non_resident_name),
|
||||
sizeof(non_resident_name) - strlen(non_resident_name),
|
||||
",%d", info[i]->hdr.fi.dfPoints );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue