--- BasiliskII/src/disk.cpp 2001/07/14 20:01:18 1.11 +++ BasiliskII/src/disk.cpp 2005/01/30 21:42:13 1.16 @@ -1,7 +1,7 @@ /* * disk.cpp - Generic disk driver * - * Basilisk II (C) 1997-2001 Christian Bauer + * Basilisk II (C) 1997-2005 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,8 @@ * Technote FL 24: "Don't Look at ioPosOffset for Devices" */ +#include "sysdeps.h" + #include #include @@ -33,7 +35,6 @@ using std::vector; #endif -#include "sysdeps.h" #include "cpu_emulation.h" #include "main.h" #include "macos_util.h" @@ -134,8 +135,8 @@ static void find_hfs_partition(disk_driv // Partition map block found, Apple HFS partition? if (strcmp((char *)(map + 48), "Apple_HFS") == 0) { - info.start_byte = ntohl(((uint32 *)map)[2]) << 9; - info.num_blocks = ntohl(((uint32 *)map)[3]); + info.start_byte = (loff_t)((map[8] << 24) | (map[9] << 16) | (map[10] << 8) | map[11]) << 9; + info.num_blocks = (map[12] << 24) | (map[13] << 16) | (map[14] << 8) | map[15]; D(bug(" HFS partition found at %d, %d blocks\n", info.start_byte, info.num_blocks)); break; }