]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commit
bugfix: loop for ortgmem_type should be for the number of MAX_RTG_BOARDS
authorDimitris Panokostas <dimitris.panokostas@norce.io>
Fri, 16 Dec 2022 08:10:39 +0000 (09:10 +0100)
committerDimitris Panokostas <dimitris.panokostas@norce.io>
Fri, 16 Dec 2022 08:10:39 +0000 (09:10 +0100)
commitab4acb584573d0d5da0f4dadba2c5c2d516f6bc4
treef153b1442cd4da6dd4621c8b05625c7d65224c46
parent0df9fc950ed31b03fa99c00f21ecd7d2c0354ce0
bugfix: loop for ortgmem_type should be for the number of MAX_RTG_BOARDS

ortgmem_type is defined having a size of MAX_RTG_BOARDS, but the loop uses MAX_RAM_BOARDS when going through it.

Since MAX_RAM_BOARDS and MAX_RTG_BOARDS happen to be the same (4) in WinUAE, it didn't have any effect. However, if those happen to be different (like in Amiberry, where MAX_RTG_BOARDS is set to 1), then this will cause undefined behavior after the first iteration.
od-win32/mman.cpp