mirror of
https://github.com/open-simh/simh.git
synced 2026-01-14 15:46:31 +00:00
TAPE: Simplify range expression to avoid cast size reduction
This commit is contained in:
parent
8cbe4ba0bd
commit
813d8f6290
@ -884,8 +884,9 @@ switch (f) { /* the read method depen
|
||||
break;
|
||||
}
|
||||
|
||||
else if (uptr->pos < bufcap * sizeof (t_mtrlnt)) /* if less than a full buffer remains */
|
||||
bufcap = (uint32)(uptr->pos / sizeof (t_mtrlnt));/* then reduce the capacity accordingly */
|
||||
else if (uptr->pos < sizeof (buffer)) /* if less than a full buffer remains */
|
||||
bufcap = (uint32) uptr->pos /* then reduce the capacity accordingly */
|
||||
/ sizeof (t_mtrlnt);
|
||||
|
||||
sim_fseek (uptr->fileref, /* seek back to the location */
|
||||
uptr->pos - bufcap * sizeof (t_mtrlnt), /* corresponding to the start */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user