fix vrc7 issue #235, update state.c (#245)

* vrc7: Add sound save states

* Try to fix some save state issues

try to fix big-endian related save problems

* vrc7: fix crash in some cases when loading states
This commit is contained in:
retro-wertz
2018-12-12 06:16:02 +08:00
committed by hizzlekizzle
parent 25fdf55f8f
commit e3cf3efc69
3 changed files with 32 additions and 5 deletions

View File

@@ -31,7 +31,10 @@ void FlipByteOrder(uint8 *src, uint32 count)
uint8 *start = src;
uint8 *end = src + count - 1;
while(start < end)
if ((count & 1) || !count)
return; /* This shouldn't happen. */
while (count--)
{
uint8 tmp;