mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-27 07:52:14 +00:00
fix
This commit is contained in:
parent
cb77760562
commit
85b740d670
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user