aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index bcb5d040..cec25ad3 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -648,7 +648,7 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
if (!hd_geometry.driveno)
hd_geometry.driveno = 0x80;
- if (*(uint16_t *) ((char *)where + 512 - 2) == 0xaa55) {
+ if (*(uint16_t *) ((char *)where + hd_geometry.offset + 512 - 2) == 0xaa55) {
for (i = 0; i < 4; i++) {
if (ptab[i].type && !(ptab[i].active & 0x7f)) {
s = (ptab[i].start_s & 0x3f);