Skip to content

Commit

Permalink
Fixed FILE device bug in EXOS 10
Browse files Browse the repository at this point in the history
  • Loading branch information
istvan-v committed Dec 11, 2016
1 parent 584462c commit 82bdb07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ep128vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ namespace Ep128 {
filePos = long(readUserMemory(uint16_t(R.DE.W)))
| (long(readUserMemory(uint16_t(R.DE.W + 1))) << 8)
| (long(readUserMemory(uint16_t(R.DE.W + 2))) << 16)
| (long(readUserMemory(uint16_t(R.DE.W + 2))) << 24);
| (long(readUserMemory(uint16_t(R.DE.W + 3))) << 24);
if (filePos & long(0x80000000UL)) {
R.AF.B.h = 0xAE; // negative position: invalid parameter
break;
Expand All @@ -477,7 +477,7 @@ namespace Ep128 {
break;
}
// set or restore file position
if (filePos > fileSize && filePos >= 0x01000000L) {
if (filePos > fileSize && filePos >= 0x02000000L) {
R.AF.B.h = 0xAE; // invalid parameter
break;
}
Expand Down

0 comments on commit 82bdb07

Please sign in to comment.