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

@@ -31,7 +31,11 @@ namespace Tesses::Framework::Streams {
{
if(this->offset < this->read)
{
#if defined(_WIN32)
sz = min(sz,this->read-this->offset);
#else
sz = std::min(sz,this->read-this->offset);
#endif
memcpy(buff, this->buffer+this->offset, sz);
this->offset+=sz;
return sz;
@@ -40,8 +44,11 @@ namespace Tesses::Framework::Streams {
{
this->read = this->strm->Read(this->buffer, this->bufferSize);
this->offset=0;
#if defined(_WIN32)
sz = min(sz,this->read-this->offset);
#else
sz = std::min(sz,this->read-this->offset);
#endif
memcpy(buff, this->buffer+this->offset, sz);
this->offset+=sz;
return sz;