Fixed mem_reset_page_blocks() in an even better way, the for block itself now uses pages_sz as the upper limit.

This commit is contained in:
OBattler
2018-10-17 02:50:23 +02:00
parent 3dc9e113f3
commit 2cd20ea319

View File

@@ -12,7 +12,7 @@
* the DYNAMIC_TABLES=1 enables this. Will eventually go
* away, either way...
*
* Version: @(#)mem.c 1.0.17 2018/10/17
* Version: @(#)mem.c 1.0.18 2018/10/17
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1905,10 +1905,7 @@ mem_reset_page_blocks(void)
{
uint32_t c;
if (pages == NULL) return;
for (c = 0; c < ((mem_size * 1024) >> 12); c++) {
if (c >= pages_sz)
if (pages == NULL) return;
for (c = 0; c < pages_sz; c++) {
pages[c].write_b = mem_write_ramb_page;