coverity: fgetc could also fail for other reasons than feof
This commit is contained in:
parent
5fdda24365
commit
09f3117fd1
1 changed files with 5 additions and 1 deletions
|
@ -207,7 +207,11 @@ std::optional<uint16_t> load_tape(bus *const b, const std::string & file)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t c = fgetc(fh);
|
int c = fgetc(fh);
|
||||||
|
if (c == -1) {
|
||||||
|
DOLOG(warning, true, "read failure");
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
csum += c;
|
csum += c;
|
||||||
|
|
Loading…
Add table
Reference in a new issue