Skip to content

Commit 663397b

Browse files
committed
FIX: change on image must return position just past the change
... not just with `insert`
1 parent 3288007 commit 663397b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/t-image.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,12 @@ INLINE REBCNT ARGB_To_BGR(REBCNT i)
762762
Expand_Series(VAL_SERIES(value), index, dup * part);
763763
CLEAR_IMAGE(VAL_BIN(value) + (index * 4), dup, part);
764764
Reset_Height(value);
765-
if (action == A_INSERT)
766-
VAL_INDEX(value) = index + (dup * part); // so it is on position after insertion
767765
tail = VAL_TAIL(value);
768766
only = 0;
769767
}
768+
if (action != A_APPEND)
769+
VAL_INDEX(value) = index + (dup * part); // so it is on position after insertion or change
770+
770771
ip = VAL_IMAGE_HEAD(value);
771772

772773
// Handle the datatype of the argument.

0 commit comments

Comments
 (0)