mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
wasm gc: fix issue with detection of native byte order in NIO emulation
This commit is contained in:
parent
c56f5be2d9
commit
d29b436fa5
@ -33,7 +33,7 @@ public final class TByteOrder {
|
||||
|
||||
public static TByteOrder nativeOrder() {
|
||||
if (nativeOrder == null) {
|
||||
if (PlatformDetector.isJavaScript()) {
|
||||
if (PlatformDetector.isJavaScript() || PlatformDetector.isWebAssemblyGC()) {
|
||||
var buffer = new ArrayBuffer(2);
|
||||
var shortArray = new Int16Array(buffer);
|
||||
shortArray.set(0, (short) 1);
|
||||
|
Loading…
Reference in New Issue
Block a user