resource.c: Fix firmware loading bug (#1140)

This commit is contained in:
Soeren Apel 2018-03-20 09:41:51 +01:00 committed by Uwe Hermann
parent 410883baf6
commit 366ccb8ab7
1 changed files with 5 additions and 1 deletions

View File

@ -128,7 +128,11 @@ static FILE *try_open_file(const char *datadir, const char *subdir,
char *filename;
FILE *file;
if (subdir)
filename = g_build_filename(datadir, subdir, name, NULL);
else
filename = g_build_filename(datadir, name, NULL);
file = g_fopen(filename, "rb");
if (file)