1
0

Fix COPY adding elements

This commit is contained in:
otya128
2016-12-19 23:15:29 +09:00
parent 2ac6efc1ed
commit 7cf62acc80
2 changed files with 48 additions and 0 deletions

View File

@@ -1994,6 +1994,18 @@ class BuiltinFunction
throw new TypeMismatch("COPY", sourceArrayIndex + 2);
len = args[sourceArrayIndex + 1].castInteger;
}
else
{
len = src.length - srcoffset;
}
if (dst.length < len + dstoffset)
{
if (dst.dimCount != 1)
{
throw new SubscriptOutOfRange("COPY");
}
dst.length = len + dstoffset;
}
if (src.type == ValueType.StringArray && dst.type == ValueType.StringArray)
{
for(int i = 0; i < len; i++)