aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/mini-os/mm.c')
-rw-r--r--extras/mini-os/mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/mini-os/mm.c b/extras/mini-os/mm.c
index 980e32c0a2..03fb3e9ab5 100644
--- a/extras/mini-os/mm.c
+++ b/extras/mini-os/mm.c
@@ -687,7 +687,7 @@ void *map_frames(unsigned long *f, unsigned long n)
/* Find a run of n contiguous frames */
for (x = 0; x <= 1024 - n; x += y + 1) {
for (y = 0; y < n; y++)
- if (demand_map_pgt[y] & _PAGE_PRESENT)
+ if (demand_map_pgt[x+y] & _PAGE_PRESENT)
break;
if (y == n)
break;