VOGONS


Minor bug in paging.h

Topic actions

First post, by M-HT

User metadata
Rank Member
Rank
Member

Hi,

I found a minor bug in the file include/paging.h.

In the function get_tlb_entry the line:

if (TLB_BANKS && (index > TLB_SIZE)) {

should be:

if (TLB_BANKS && (index >= TLB_SIZE)) {

because when index == TLB_SIZE, then paging.tlbh[index] is out of bounds of tlbh (the definition is: tlb_entry tlbh[TLB_SIZE]; ).

Reply 1 of 1, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Thanks, I'll check that out!