Skip to content

Commit 22d8b6d

Browse files
committed
GPUBackend: Fix infinite loop on state allocation failure
1 parent 461aaed commit 22d8b6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/gpu_backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ bool GPUBackend::AllocateMemorySaveStates(std::span<System::MemorySaveState> sta
365365
if (!backend->AllocateMemorySaveState(states[i], error))
366366
{
367367
// Free anything that was allocated.
368-
for (size_t j = 0; j <= i; i++)
368+
for (size_t j = 0; j <= i; j++)
369369
{
370370
states[j].state_data.deallocate();
371371
states[j].vram_texture.reset();

0 commit comments

Comments
 (0)