From b5ff3a311158ae44084b6d42acc0148b34c4e4f3 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 29 Jun 2010 00:10:54 +0000 Subject: [PATCH] fix emulator memory corruption when a ridiculously large texture is bound, such as one that might be defined by 0xFFFFFFFF --- desmume/src/texcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/texcache.cpp b/desmume/src/texcache.cpp index 8ae0804f7..c4da2de33 100644 --- a/desmume/src/texcache.cpp +++ b/desmume/src/texcache.cpp @@ -23,7 +23,7 @@ using std::max; class MemSpan { public: - static const int MAXSIZE = 8; + static const int MAXSIZE = 17; //max size for textures: 1024*1024*2 bytes / 128*1024 banks + 1 for wraparound MemSpan() : numItems(0), size(0)