diff --git a/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp b/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp index ad0e09e094..75ce5e2534 100644 --- a/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp +++ b/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp @@ -240,12 +240,12 @@ private: int h = *head; int t = *tail; int size = h - t; - if (size < 0) size += bufsize; - else if (size >= bufsize) + if (size >= bufsize) { //shouldnt be possible for size to be anything but bufsize here size = 0; } + else if (size < 0) size += bufsize; return size; } diff --git a/output/dll/libsneshawk-32-compatibility.exe b/output/dll/libsneshawk-32-compatibility.exe index abfd4b1c79..d211acd567 100644 Binary files a/output/dll/libsneshawk-32-compatibility.exe and b/output/dll/libsneshawk-32-compatibility.exe differ diff --git a/output/dll/libsneshawk-32-performance.exe b/output/dll/libsneshawk-32-performance.exe index 8a69243ef7..1bfe4e046c 100644 Binary files a/output/dll/libsneshawk-32-performance.exe and b/output/dll/libsneshawk-32-performance.exe differ