From 9d2e9d79119fe14926f962116af350bb0f66b91b Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 18 Aug 2016 12:09:18 +0300 Subject: [PATCH] Fix Uint16Array constructors. Fix https://github.com/konsoletyper/teavm/issues/209 --- .../main/java/org/teavm/jso/typedarrays/Uint16Array.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java index cf19f33a2..751c86359 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java @@ -29,12 +29,12 @@ public abstract class Uint16Array extends ArrayBufferView { @JSIndexer public abstract void set(int index, int value); - @JSBody(params = "length", script = "return new Uint8Array(length);") + @JSBody(params = "length", script = "return new Uint16Array(length);") public static native Uint16Array create(int length); - @JSBody(params = "buffer", script = "return new Uint8Array(buffer);") + @JSBody(params = "buffer", script = "return new Uint16Array(buffer);") public static native Uint16Array create(ArrayBuffer buffer); - @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);") + @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint16Array(buffer, offset, length);") public static native Uint16Array create(ArrayBuffer buffer, int offset, int length); }