Sfoglia il codice sorgente

ipc_helpers: Fix alignment (was wrong as a result of a dynarmic bug).

bunnei 8 anni fa
parent
commit
3f2a738d34
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      src/core/hle/ipc_helpers.h

+ 4 - 3
src/core/hle/ipc_helpers.h

@@ -39,11 +39,12 @@ public:
     }
     }
 
 
     /**
     /**
-     * Aligns the current position forward to a 16-byte boundary, padding with zeros. Jumps forward
-     * by 16-bytes at a minimum.
+     * Aligns the current position forward to a 16-byte boundary, padding with zeros.
      */
      */
     void AlignWithPadding() {
     void AlignWithPadding() {
-        Skip(4 - (index & 3), true);
+        if (index & 3) {
+            Skip(4 - (index & 3), true);
+        }
     }
     }
 
 
     unsigned GetCurrentOffset() const {
     unsigned GetCurrentOffset() const {