Merged 3118 into 0.9.5 branch to fix

https://buildd.debian.org/fetch.cgi?pkg=desmume;ver=0.9.5-1;arch=sparc;stamp=1262596888
This commit is contained in:
yabause 2010-01-13 22:17:03 +00:00
parent d4bf96040a
commit 5e630a24c1
1 changed files with 3 additions and 2 deletions

View File

@ -852,13 +852,14 @@ static int SubWrite(EMUFILE* os, const SFORMAT *sf)
keyset.insert(sf->desc);
#endif
#ifdef LOCAL_LE
// no need to ever loop one at a time if not flipping byte order
os->fwrite((char *)sf->v,size*count);
#else
if(sz == 1) {
if(size == 1) {
//special case: write a huge byte array
os->fwrite((char *)sf->v,1,count);
os->fwrite((char *)sf->v,count);
} else {
for(int i=0;i<count;i++) {
FlipByteOrder((u8*)sf->v + i*size, size);