From d76dea463c931d0c3b22dcd30797fc7b0505f7e7 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 17 Oct 2017 22:09:28 -0500 Subject: [PATCH] Fix version mismatch when loading FileSystems --- deps/ox/src/ox/fs/filesystem.cpp | 2 +- deps/ox/src/ox/fs/filesystem.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem.cpp b/deps/ox/src/ox/fs/filesystem.cpp index b6f9b94f..6a2535fb 100644 --- a/deps/ox/src/ox/fs/filesystem.cpp +++ b/deps/ox/src/ox/fs/filesystem.cpp @@ -16,7 +16,7 @@ FileSystem *createFileSystem(uint8_t *buff, size_t buffSize, bool ownsBuff) { FileSystem *fs = nullptr; switch (version) { - case 6: + case FileStore16::VERSION: switch (type) { case ox::OxFS_16: fs = new FileSystem16(buff, ownsBuff); diff --git a/deps/ox/src/ox/fs/filesystem.hpp b/deps/ox/src/ox/fs/filesystem.hpp index 1092195e..c63769d2 100644 --- a/deps/ox/src/ox/fs/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem.hpp @@ -719,7 +719,7 @@ uint64_t FileSystemTemplate::generateInodeId() { // find an inode value for the given path while (!inode) { inode = rand.gen(); - inode >>= 64 - 8 * sizeof(typename FileStore::InodeId_t); + inode >>= 64 - 8 * sizeof(typename FileStore::InodeId_t); // make sure this does not already exist if (inode < INODE_RESERVED_END || stat(inode).inode) {