From 8928b59dbf608424c4129470999ae99f5a714da3 Mon Sep 17 00:00:00 2001 From: superp00t Date: Mon, 14 Aug 2023 20:15:17 -0400 Subject: [PATCH] fix(system/file): typo --- bc/system/file/posix/System_File.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bc/system/file/posix/System_File.cpp b/bc/system/file/posix/System_File.cpp index 61ae20f..88d4275 100644 --- a/bc/system/file/posix/System_File.cpp +++ b/bc/system/file/posix/System_File.cpp @@ -274,7 +274,7 @@ bool Copy(File::Filesystem* fs, Stacked::FileParms* parms) { auto sz_source = File::GetFileInfo(st_source)->size; // copybuffer size upper limit is BC_FILE_SYSTEM_COPYBUFFER_SIZE - size_t sz_copybuffer = std::min(static_cast(BC_FILE_SYSTEM_COPYBUFFER_SIZE)); + size_t sz_copybuffer = std::min(static_cast(sz_source), static_cast(BC_FILE_SYSTEM_COPYBUFFER_SIZE)); auto u8_copybuffer = reinterpret_cast(Memory::Allocate(sz_copybuffer)); // Loop through the source file, reading segments into copybuffer