mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 15:32:16 +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;
|
||||
len = toPos - fromPos;
|
||||
if (!len) return changetype<String>("");
|
||||
if (!fromPos && toPos == this.length) return this;
|
||||
if (!fromPos && toPos == this.length << 1) return this;
|
||||
var out = ALLOC(len);
|
||||
memory.copy(out, changetype<usize>(this) + fromPos, len);
|
||||
return REGISTER<String>(out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user