diff --git a/deps/ox/src/ox/fs/filesystem2/directory.hpp b/deps/ox/src/ox/fs/filesystem2/directory.hpp index 50bd8790..868108f8 100644 --- a/deps/ox/src/ox/fs/filesystem2/directory.hpp +++ b/deps/ox/src/ox/fs/filesystem2/directory.hpp @@ -159,12 +159,12 @@ template ValErr Directory::find(PathIterator it) const noexcept { ValErr retval = {0, 1}; auto size = it.nextSize(); - auto name = reinterpret_cast(ox_alloca(size + 1)); + auto name = ox_malloca(size + 1, char); it.next(name, size); auto buff = m_fs->read(m_inodeId).template to(); for (auto i = buff->iterator(); i.hasNext(); i.next()) { auto data = i->data(); - if (data.valid() && data->name == name) { + if (data.valid() && data->name == name.get()) { retval = static_cast(data->inode); } } diff --git a/deps/ox/src/ox/std/new.hpp b/deps/ox/src/ox/std/new.hpp index 1f61a3e1..b1247946 100644 --- a/deps/ox/src/ox/std/new.hpp +++ b/deps/ox/src/ox/std/new.hpp @@ -27,12 +27,6 @@ void *operator new(std::size_t, void*) noexcept; -namespace ox { - -constexpr auto MallocaStackLimit = 1024; - -} - /** * @return an ox::MallocaPtr of the given type pointing to the requested size memory allocation */ @@ -44,6 +38,8 @@ constexpr auto MallocaStackLimit = 1024; namespace ox { +constexpr auto MallocaStackLimit = 1024; + /** * MallocaPtr will automatically cleanup the pointed to address upon * destruction if the size of the allocation is greater than MallocaStackLimit.