mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix bugs with memory operations
This commit is contained in:
parent
f7e39e6a4d
commit
74db07537d
|
@ -84,14 +84,14 @@ public final class WasmRuntime {
|
|||
address.putInt(0);
|
||||
break;
|
||||
case 1:
|
||||
address.add(3).putByte((byte) 0);
|
||||
address.add(1).putByte((byte) 0);
|
||||
address.add(2).putShort((short) 0);
|
||||
break;
|
||||
case 2:
|
||||
address.add(2).putShort((short) 0);
|
||||
break;
|
||||
case 3:
|
||||
address.add(1).putByte((byte) 0);
|
||||
address.add(2).putShort((short) 0);
|
||||
address.add(3).putByte((byte) 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -204,14 +204,14 @@ public final class WasmRuntime {
|
|||
alignedTargetStart.putInt(alignedSourceStart.getInt());
|
||||
break;
|
||||
case 1:
|
||||
alignedTargetStart.add(3).putByte(alignedSourceStart.add(3).getByte());
|
||||
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
||||
alignedTargetStart.add(1).putByte(alignedSourceStart.add(1).getByte());
|
||||
break;
|
||||
case 2:
|
||||
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
||||
break;
|
||||
case 3:
|
||||
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
||||
alignedTargetStart.add(1).putByte(alignedSourceStart.add(1).getByte());
|
||||
alignedTargetStart.add(3).putByte(alignedSourceStart.add(3).getByte());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user