@@ -118,7 +118,8 @@ static REBCNT find_string(REBSER *series, REBCNT index, REBCNT end, REBVAL *targ
118
118
119
119
if (flags & AM_FIND_SAME ) flags |= AM_FIND_CASE ; // /SAME has same functionality as /CASE for any-string!
120
120
121
- if (ANY_BINSTR (target )) {
121
+ //O: not using ANY_BINSTR as TAG is now handled separately
122
+ if (VAL_TYPE (target ) >= REB_BINARY && VAL_TYPE (target ) < REB_TAG ) {
122
123
// Do the optimal search or the general search?
123
124
if (BYTE_SIZE (series ) && VAL_BYTE_SIZE (target ) && !(flags & ~(AM_FIND_CASE |AM_FIND_MATCH ))) {
124
125
return Find_Byte_Str (series , start , VAL_BIN_DATA (target ), len , !GET_FLAG (flags , ARG_FIND_CASE - 1 ), GET_FLAG (flags , ARG_FIND_MATCH - 1 ));
@@ -128,6 +129,10 @@ static REBCNT find_string(REBSER *series, REBCNT index, REBCNT end, REBVAL *targ
128
129
return Find_Str_Str (series , start , index , end , skip , VAL_SERIES (target ), VAL_INDEX (target ), len , flags & (AM_FIND_MATCH | AM_FIND_CASE | AM_FIND_TAIL ));
129
130
}
130
131
}
132
+ else if (IS_TAG (target )) {
133
+ return Find_Str_Tag (series , start , index , end , skip , VAL_SERIES (target ), VAL_INDEX (target ), len , flags & (AM_FIND_MATCH | AM_FIND_CASE | AM_FIND_TAIL ));
134
+ }
135
+ //O: next condition is always false! It could be removed.
131
136
else if (IS_BINARY (target )) {
132
137
return Find_Byte_Str (series , start , VAL_BIN_DATA (target ), len , 0 , GET_FLAG (flags , ARG_FIND_MATCH - 1 ));
133
138
}
0 commit comments