From 15cca777c1bf3daabd2282baf8a4f169f945c446 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 2 Jul 2016 03:30:42 -0500 Subject: [PATCH] Fixed some glaring issues with FileStore::compress. --- src/ox/fs/filestore.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ox/fs/filestore.hpp b/src/ox/fs/filestore.hpp index b1ef6d078..c8424b568 100644 --- a/src/ox/fs/filestore.hpp +++ b/src/ox/fs/filestore.hpp @@ -272,7 +272,10 @@ void FileStore::compress() { auto current = ptr(m_firstInode); while (current->next) { auto prevEnd = current + current->size(); + auto prev = ptr(current); + current->next = ptr(current) + current->size(); current = ptr(current->next); + current->prev = prev; if (prevEnd != current) { memcpy(prevEnd, current, current->size()); current = prevEnd;