From 4f4b8ada8cd4e42ede9a1a65529fe1ec4d59a0e9 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 25 Oct 2023 02:53:20 +0300 Subject: [PATCH] Kernel: Fix read offset of RamFileInode --- kernel/kernel/FS/RamFS/Inode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kernel/FS/RamFS/Inode.cpp b/kernel/kernel/FS/RamFS/Inode.cpp index 0492b00d..5c0f0231 100644 --- a/kernel/kernel/FS/RamFS/Inode.cpp +++ b/kernel/kernel/FS/RamFS/Inode.cpp @@ -62,7 +62,7 @@ namespace Kernel if (offset >= size()) return 0; size_t to_copy = BAN::Math::min(m_inode_info.size - offset, buffer.size()); - memcpy(buffer.data(), m_data.data(), to_copy); + memcpy(buffer.data(), m_data.data() + offset, to_copy); return to_copy; }