mirror of
https://github.com/open-simh/simh.git
synced 2026-01-11 23:53:30 +00:00
FIO: Properly bound byte swap activity when reading on big endian hosts
This commit is contained in:
parent
203ca72356
commit
cb4d6cfc29
@ -155,7 +155,7 @@ if ((size == 0) || (count == 0)) /* check arguments */
|
||||
c = fread (bptr, size, count, fptr); /* read buffer */
|
||||
if (sim_end || (size == sizeof (char)) || (c == 0)) /* le, byte, or err? */
|
||||
return c; /* done */
|
||||
sim_buf_swap_data (bptr, size, count);
|
||||
sim_buf_swap_data (bptr, size, c);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user