> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 13:13:37 up 6 days, 22:11,  1 user,  load average: 0.67, 0.24, 0.21
This commit is contained in:
tracer-ics2023
2024-09-24 13:13:39 +08:00
committed by zzy
parent 4f6256a9c5
commit da1c77dcf8

View File

@ -96,7 +96,7 @@ size_t _fs_lseek(int fd, size_t offset, int whence) {
default:
break;
}
if (file_table[fd].open_offset < file_table[fd].size) {
if (file_table[fd].open_offset > file_table[fd].size) {
return -1;
}
return file_table[fd].open_offset;