mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/preproc: Do not attempt to load empty included files.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
07b7975d09
commit
f830ac1206
Notes:
Henri Verbeet
2025-02-20 16:06:33 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Elizabeth Figura (@zfigura) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1363
@@ -178,6 +178,16 @@ static int default_open_include(const char *filename, bool local,
|
|||||||
if (S_ISREG(st.st_mode))
|
if (S_ISREG(st.st_mode))
|
||||||
size = st.st_size;
|
size = st.st_size;
|
||||||
|
|
||||||
|
if (!size)
|
||||||
|
{
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
out->code = NULL;
|
||||||
|
out->size = 0;
|
||||||
|
|
||||||
|
return VKD3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(data = vkd3d_malloc(size)))
|
if (!(data = vkd3d_malloc(size)))
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Reference in New Issue
Block a user