summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/fs_isis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/formats/fs_isis.cpp')
-rw-r--r--src/lib/formats/fs_isis.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/formats/fs_isis.cpp b/src/lib/formats/fs_isis.cpp
index 3803af03180..d50acc8dd15 100644
--- a/src/lib/formats/fs_isis.cpp
+++ b/src/lib/formats/fs_isis.cpp
@@ -10,7 +10,10 @@
#include "fs_isis.h"
#include "img_dsk.h"
+
+#include "multibyte.h"
#include "strformat.h"
+
#include <bitset>
using namespace fs;
@@ -583,7 +586,7 @@ void isis_impl::ensure_dir_loaded()
// +11: bytes in last sector
auto remainder = i[ 11 ];
// +12..+13: size in sectors
- unsigned sectors = i[ 12 ] + (unsigned(i[ 13 ]) << 8);
+ unsigned sectors = get_u16le(&i[ 12 ]);
if (remainder > SECTOR_SIZE) {
throw std::runtime_error("Invalid dir. entry");
}