mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix map_extract
Reported by cheeser0613
This commit is contained in:
parent
114acb4887
commit
2b50a1e712
|
@ -51,17 +51,17 @@ bool Process(IStorage *pStorage, const char *pMapName, const char *pPathSave)
|
|||
dbg_msg("map_extract", "writing image: %s (%dx%d)", aBuf, pItem->m_Width, pItem->m_Height);
|
||||
|
||||
// copy image data
|
||||
IOHANDLE File = io_open(pPathSave, IOFLAG_WRITE);
|
||||
IOHANDLE File = io_open(aBuf, IOFLAG_WRITE);
|
||||
if(!File)
|
||||
{
|
||||
dbg_msg("map_extract", "failed to open file. filename='%s'", pPathSave);
|
||||
dbg_msg("map_extract", "failed to open file. filename='%s'", aBuf);
|
||||
continue;
|
||||
}
|
||||
png_t Png;
|
||||
int Error = png_open_write(&Png, 0, File);
|
||||
if(Error != PNG_NO_ERROR)
|
||||
{
|
||||
dbg_msg("map_extract", "failed to write image file. filename='%s', pnglite: %s", pPathSave, png_error_string(Error));
|
||||
dbg_msg("map_extract", "failed to write image file. filename='%s', pnglite: %s", aBuf, png_error_string(Error));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue