diff -ur grub-1.91-riscos.old/memory/arm/RISC_OS/asm.S grub-1.91-riscos/memory/arm/RISC_OS/asm.S --- grub-1.91-riscos.old/memory/arm/RISC_OS/asm.S 2007-04-13 11:13:40.000000000 +0100 +++ grub-1.91-riscos/memory/arm/RISC_OS/asm.S 2007-04-13 11:14:11.000000000 +0100 @@ -44,6 +44,7 @@ str r1, [a4] @ Store table size str r2, [ip] @ Store page size mov a1, r1 + add a1, a1, #131072 @ workaround RISC OS 4 problems bl grub_malloc movs r1, a1 ldreq pc, [sp], #4 diff -ur grub-1.91-riscos.old/memory/arm/RISC_OS/misc.c grub-1.91-riscos/memory/arm/RISC_OS/misc.c --- grub-1.91-riscos.old/memory/arm/RISC_OS/misc.c 2007-04-13 11:13:30.000000000 +0100 +++ grub-1.91-riscos/memory/arm/RISC_OS/misc.c 2007-04-11 23:02:41.000000000 +0100 @@ -131,7 +131,7 @@ last = &space.map; grub_uint8_t last_type = table[0] & 7; grub_addr_t last_index = 0; - for (grub_addr_t i = 0; i != table_size; ++i) + for (grub_addr_t i = 0; i <= table_size; ++i) { grub_uint8_t new_type, val = table[i];