From 45fa0170f76dcdcc9234dbc0fad1d66e151e83b7 Mon Sep 17 00:00:00 2001 From: yabause Date: Tue, 21 Oct 2008 19:41:04 +0000 Subject: [PATCH] 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). --- desmume/src/memorystream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/memorystream.h b/desmume/src/memorystream.h index 82b6fbdda..5fda899b5 100644 --- a/desmume/src/memorystream.h +++ b/desmume/src/memorystream.h @@ -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;