Skip to content

Commit acd9836

Browse files
committed
FIX: regression introduced in 356292c
1 parent 2d94117 commit acd9836

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/core/t-block.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ static struct {
686686
case A_TAKE:
687687
// take/part:
688688
if (D_REF(ARG_TAKE_PART)) {
689-
len = Partial1(value, D_ARG(ARG_TAKE_LENGTH));
689+
len = Partial1(value, D_ARG(ARG_TAKE_RANGE));
690690
if (len == 0) {
691691
zero_blk:
692692
Set_Block(D_RET, Make_Block(0));
@@ -749,7 +749,7 @@ static struct {
749749
args = Find_Refines(ds, ALL_FIND_REFS);
750750
// if (ANY_BLOCK(arg) || args) {
751751
len = ANY_BLOCK(arg) ? VAL_BLK_LEN(arg) : 1;
752-
if (args & AM_FIND_PART) tail = index + Partial1(value, D_ARG(ARG_FIND_LENGTH));
752+
if (args & AM_FIND_PART) tail = index + Partial1(value, D_ARG(ARG_FIND_RANGE));
753753
ret = 1;
754754
if (args & AM_FIND_SKIP) ret = Int32s(D_ARG(ARG_FIND_SIZE), 1);
755755
ret = Find_Block(ser, index, tail, arg, len, args, ret);
@@ -801,7 +801,7 @@ static struct {
801801
case A_COPY: // /PART len /DEEP /TYPES kinds
802802
#if 0
803803
args = D_REF(ARG_COPY_DEEP) ? COPY_ALL : 0;
804-
len = Partial1(value, D_ARG(ARG_COPY_LENGTH));
804+
len = Partial1(value, D_ARG(ARG_COPY_RANGE));
805805
index = (REBINT)VAL_INDEX(value);
806806
// VAL_SERIES(value) = (len > 0) ? Copy_Block_Deep(ser, index, len, args) : Make_Block(0);
807807
VAL_INDEX(value) = 0;
@@ -816,7 +816,7 @@ static struct {
816816
if (IS_DATATYPE(arg)) types |= TYPESET(VAL_DATATYPE(arg));
817817
else types |= VAL_TYPESET(arg);
818818
}
819-
len = Partial1(value, D_ARG(ARG_COPY_LENGTH));
819+
len = Partial1(value, D_ARG(ARG_COPY_RANGE));
820820
VAL_SERIES(value) = Copy_Block_Values(ser, VAL_INDEX(value), VAL_INDEX(value)+len, types);
821821
VAL_INDEX(value) = 0;
822822
}

src/core/t-string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ static struct {
633633

634634
if (ANY_BINSTR(arg)) len = VAL_LEN(arg);
635635

636-
if (args & AM_FIND_PART) tail = index + Partial(value, 0, D_ARG(ARG_FIND_LENGTH), 0);
636+
if (args & AM_FIND_PART) tail = index + Partial(value, 0, D_ARG(ARG_FIND_RANGE), 0);
637637
ret = 1; // skip size
638638
if (args & AM_FIND_SKIP) {
639639
ret = Partial(value, 0, D_ARG(ARG_FIND_SIZE), 0);

0 commit comments

Comments
 (0)