Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Azq2 committed Jun 30, 2024
1 parent 9137adc commit 11d2458
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "main.h"
#include <cstddef>
#include <cstdint>

using json = nlohmann::json;
Expand Down Expand Up @@ -241,7 +242,7 @@ std::pair<uint8_t *, size_t> readBinaryFile(const std::string &path) {
char buff[4096];
size_t readed = 0;
while (!feof(fp) && readed < maxFileSize) {
int ret = fread(bytes + readed, 1, std::min(4096LU, maxFileSize - readed), fp);
int ret = fread(bytes + readed, 1, std::min(static_cast<size_t>(4096), maxFileSize - readed), fp);
if (ret > 0) {
readed += ret;
} else if (ret < 0) {
Expand Down

0 comments on commit 11d2458

Please sign in to comment.