mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
fix
This commit is contained in:
@ -220,7 +220,7 @@ export class String extends StringBase {
|
|||||||
var toPos = max<isize>(finalStart, finalEnd) << 1;
|
var toPos = max<isize>(finalStart, finalEnd) << 1;
|
||||||
len = toPos - fromPos;
|
len = toPos - fromPos;
|
||||||
if (!len) return changetype<String>("");
|
if (!len) return changetype<String>("");
|
||||||
if (!fromPos && toPos == this.length) return this;
|
if (!fromPos && toPos == this.length << 1) return this;
|
||||||
var out = ALLOC(len);
|
var out = ALLOC(len);
|
||||||
memory.copy(out, changetype<usize>(this) + fromPos, len);
|
memory.copy(out, changetype<usize>(this) + fromPos, len);
|
||||||
return REGISTER<String>(out);
|
return REGISTER<String>(out);
|
||||||
|
Reference in New Issue
Block a user