Fix implementation of Array#splice (#347)

This commit is contained in:
Max Graey
2018-11-29 16:41:42 +02:00
committed by Daniel Wirtz
parent 1149abf824
commit 3c5c2cef80
7 changed files with 2371 additions and 1209 deletions

View File

@ -144,7 +144,7 @@ export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/s
// this function will go away once `memory.copy` becomes an intrinsic
export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c
if (dest == src) return;
if (dest === src) return;
if (src + n <= dest || dest + n <= src) {
memcpy(dest, src, n);
return;