Skip to content

Commit c23173c

Browse files
author
David Betz
committed
Fix a bug where a duplicate error message gets printed for failure to open a file.
1 parent 9a2226c commit c23173c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/loader.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ uint8_t *Loader::readFile(const char *file, int *pImageSize)
3939
FILE *fp;
4040

4141
/* open the binary file */
42-
if (!(fp = fopen(file, "rb"))) {
43-
message("103-Can't open file '%s'", file);
42+
if (!(fp = fopen(file, "rb")))
4443
return NULL;
45-
}
4644

4745
/* check for an elf file */
4846
if (ReadAndCheckElfHdr(fp, &elfHdr))

0 commit comments

Comments
 (0)