You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hostilefork added Type.bug and Ren.important on Oct 21, 2018
Hostilefork commented on Oct 21, 2018:
This problem comes from a mistake in interpreting the return result of the helpers for decoding Partial()/Partial1(). They return a length in characters offset from the VAL_INDEX() of the series, not an absolute tail position:
To get the tail, the updated VAL_INDEX() (which may be modified during Partial()) should be added to the length returned.
This commit does a general cleanup to address this and other issues, and run more of the code through the same path...unifying Partial() and Partial1() and giving them better names. For instance, a Part_Len vs. Part_Tail specialization addresses the distinction for this issue:
Submitted by: Hostilefork
This bug existed in Red as well, but was patched. Copying from that issue:
Imported from: metaeducation#2324
Comments:
This problem comes from a mistake in interpreting the return result of the helpers for decoding
Partial()
/Partial1()
. They return a length in characters offset from the VAL_INDEX() of the series, not an absolutetail
position:https://github.com/rebol/rebol/blob/25033f897b2bd466068d7663563cd3ff64740b94/src/core/t-string.c#L516
To get the tail, the updated VAL_INDEX() (which may be modified during Partial()) should be added to the length returned.
This commit does a general cleanup to address this and other issues, and run more of the code through the same path...unifying Partial() and Partial1() and giving them better names. For instance, a
Part_Len
vs.Part_Tail
specialization addresses the distinction for this issue:metaeducation/ren-c@07e32b8
The text was updated successfully, but these errors were encountered: