Fix win32 somewhat?

This commit is contained in:
2025-04-16 07:47:01 -05:00
parent fefec83b7e
commit bcd3ca9ff8
11 changed files with 20 additions and 39 deletions

View File

@ -16,11 +16,9 @@ namespace Tesses::Framework::Filesystem
{
if(!this->canRead) return 0;
if(this->pos >= this->data->file.size()) return 0;
#if defined(_WIN32)
size_t toRead = min(sz, (size_t)(this->data->file.size()-this->pos));
#else
size_t toRead = std::min(sz, (size_t)(this->data->file.size()-this->pos));
#endif
memcpy(buff, this->data->file.data() + this->pos, toRead);
this->pos += toRead;