Patch by riccardom:

a negative integral was passed to a unsigned variable so
declared it signed and casted it to unsigned when it is known
to be positive (size_t vs ssize_t).
This commit is contained in:
yabause 2008-10-21 19:41:04 +00:00
parent d0d974b9c7
commit 45fa0170f7
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ private:
setg(buf, buf+rp, buf + length);
}
void expand(size_t upto)
void expand(ssize_t upto)
{
if(!myBuf && !usevec)
throw new std::runtime_error("memory_streambuf is not expandable");
@ -189,7 +189,7 @@ private:
if(upto == -1)
newcapacity = capacity + capacity/2 + 2;
else
newcapacity = std::max(upto,capacity);
newcapacity = std::max((size_t)upto,capacity);
if(newcapacity == capacity) return;