This commit is contained in:
iceman1001
2024-05-27 20:29:02 +02:00
parent 8d1e9c1f5d
commit 369db7c9d7
14 changed files with 109 additions and 71 deletions
+4 -4
View File
@@ -613,13 +613,13 @@ size_t restore_buffer8(buffer_savestate_t saveState, uint8_t *dest) {
// Unpack the array
for (size_t i = 0; i < saveState.bufferSize; i++) {
dest[index++] = saveState.buffer[i];
if(index == length) break;
if (index == length) break;
dest[index++] = (saveState.buffer[i] >> 8) & 0xFF;
if(index == length) break;
if (index == length) break;
dest[index++] = (saveState.buffer[i] >> 16) & 0xFF;
if(index == length) break;
if (index == length) break;
dest[index++] = (saveState.buffer[i] >> 24) & 0xFF;
if(index == length) break;
if (index == length) break;
}
return index;