Fix win32 somewhat?

This commit is contained in:
2025-04-16 07:28:11 -05:00
parent 0e1f35c1a0
commit fefec83b7e
10 changed files with 73 additions and 11 deletions

View File

@ -16,7 +16,11 @@ 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;