AltairZ80: Fix issue detected by Coverity (unchecked sim_fseek in n8vem.c)
This commit is contained in:
parent
5960bca32a
commit
ddb4cb4661
1 changed files with 3 additions and 3 deletions
|
@ -279,9 +279,9 @@ static t_stat n8vem_detach(UNIT *uptr)
|
|||
sim_debug(VERBOSE_MSG, &n8vem_dev, "N8VEM: Detach %s.\n", i == 0 ? "ROM" : "RAM");
|
||||
|
||||
/* rewind to the beginning of the file. */
|
||||
sim_fseek(uptr->fileref, 0, SEEK_SET);
|
||||
|
||||
if(i == 0) { /* ROM */
|
||||
if(sim_fseek(uptr->fileref, 0, SEEK_SET)) {
|
||||
sim_debug(VERBOSE_MSG, &n8vem_dev, "N8VEM: Cannot write into %s image.\n", i == 0 ? "ROM" : "RAM");
|
||||
} else if(i == 0) { /* ROM */
|
||||
/* Save the ROM back to disk if SAVEROM is set. */
|
||||
if(save_rom == 1) {
|
||||
sim_debug(VERBOSE_MSG, &n8vem_dev, "N8VEM: Writing %d bytes into ROM image.\n", N8VEM_ROM_SIZE);
|
||||
|
|
Loading…
Add table
Reference in a new issue