mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
added missing close for a file search handle
This commit is contained in:
parent
c3a91f19b3
commit
9221f3dda2
|
@ -278,8 +278,13 @@ IOHANDLE io_open(const char *filename, int flags)
|
|||
if(!filename || !length || filename[length-1] == '\\')
|
||||
return 0x0;
|
||||
handle = FindFirstFile(filename, &finddata);
|
||||
if(handle == INVALID_HANDLE_VALUE || str_comp(filename+length-str_length(finddata.cFileName), finddata.cFileName))
|
||||
if(handle == INVALID_HANDLE_VALUE)
|
||||
return 0x0;
|
||||
else if(str_comp(filename+length-str_length(finddata.cFileName), finddata.cFileName) != 0)
|
||||
{
|
||||
FindClose(handle);
|
||||
return 0x0;
|
||||
}
|
||||
FindClose(handle);
|
||||
#endif
|
||||
return (IOHANDLE)fopen(filename, "rb");
|
||||
|
|
Loading…
Reference in a new issue