mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Use io_read_all
to load icon font
This commit is contained in:
parent
74d7d4fe78
commit
ceca44ea23
|
@ -699,11 +699,11 @@ public:
|
|||
IOHANDLE File = pStorage->OpenFile(pFontFile, IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
if(File)
|
||||
{
|
||||
size_t Size = io_length(File);
|
||||
unsigned char *pBuf = (unsigned char *)malloc(Size);
|
||||
io_read(File, pBuf, Size);
|
||||
void *pBuf;
|
||||
unsigned Size;
|
||||
io_read_all(File, &pBuf, &Size);
|
||||
io_close(File);
|
||||
LoadFont(aFilename, pBuf, Size);
|
||||
LoadFont(aFilename, (unsigned char *)pBuf, Size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue