Skip to content

Commit

Permalink
FIX: not available image size when passed in to an extension (regress…
Browse files Browse the repository at this point in the history
…ion)

resolves: Oldes/Rebol-issues#1809
  • Loading branch information
Oldes committed Oct 6, 2022
1 parent 2b53189 commit 9a63e88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/f-extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ x*/ RXIARG Value_To_RXI(REBVAL *val)
arg.series = VAL_SERIES(val);
arg.width = VAL_IMAGE_WIDE(val);
arg.height = VAL_IMAGE_HIGH(val);
arg.index = VAL_INDEX(val);
// There is no way how to pass index information in one RXIARG value!
//arg.index = VAL_INDEX(val); // Don't do this! index is shared with the size and would overwrite it!
break;
case RXE_TUPLE:
arg.tuple_len = VAL_TUPLE_LEN(val);
Expand Down Expand Up @@ -166,7 +167,9 @@ x*/ void RXI_To_Value(REBVAL *val, RXIARG arg, REBCNT type)
VAL_SERIES(val) = arg.series;
VAL_IMAGE_WIDE(val) = arg.width;
VAL_IMAGE_HIGH(val) = arg.height;
VAL_INDEX(val) = arg.index;
// There can be only index or image size in the RXIARG, so the index is
// unfortunatelly lost when image is passed to extension and back!
VAL_INDEX(val) = 0;
break;
case RXE_TUPLE:
VAL_TUPLE_LEN(val) = arg.tuple_len;
Expand Down

0 comments on commit 9a63e88

Please sign in to comment.