diff --git a/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp b/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp index 7dd563f1..c8feb6d6 100644 --- a/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp +++ b/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp @@ -1216,7 +1216,7 @@ auto winfsp_drive::Write(PVOID /*file_node*/, PVOID file_desc, PVOID buffer, return handle_error(api_error::success); } - if (offset + length >) { + if (offset + length > file_size) { length = static_cast(file_size - offset); } }