diff options
Diffstat (limited to 'xex.c')
-rw-r--r-- | xex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -173,7 +173,7 @@ int xex_fread_seg_data(xex_segment *seg, FILE *file) { return 1; } - if(ferror(file)) { + if(res < 0 || ferror(file)) { xex_errno = XERR_SYSCALL; } else { /* EOF or short read */ |