Skip to content

Commit

Permalink
Replace abort() with error code
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Oct 10, 2024
1 parent a27d2f4 commit abbe294
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions native/jsdos/jsdos-drive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ uint8_t jsdos::SockDrive::Read_AbsoluteSector(uint32_t sectnum, void* data) {
int errcode = sockdrive_read(handle, sectnum, (uint8_t*) data);
if (errcode) {
std::cerr << "sockdrive_read error " << errcode << std::endl;
abort();
}
return 0;
return errcode;
}

uint8_t jsdos::SockDrive::Write_AbsoluteSector(uint32_t sectnum, const void* data) {
Expand All @@ -41,5 +40,5 @@ uint8_t jsdos::SockDrive::Write_AbsoluteSector(uint32_t sectnum, const void* dat
std::cerr << "sockdrive_write error " << errcode << std::endl;
abort();
}
return 0;
return errcode;
}

0 comments on commit abbe294

Please sign in to comment.