fix: read out of bound in win64 platform

This commit is contained in:
鲁树人 2024-12-20 01:48:45 +00:00
parent 2fd8f75279
commit 39b30d8ca8

View File

@ -33,7 +33,7 @@ class KggTask {
std::ifstream kgg_stream_in(kgg_path_, std::ios::binary);
char header[0x100]{};
kgg_stream_in.read(header, sizeof(kgg_stream_in));
kgg_stream_in.read(header, sizeof(header));
if (std::equal(kMagicHeader.cbegin(), kMagicHeader.cend(), header)) {
warning(L"invalid kgg header");
return;