Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5017,8 +5017,8 @@ S_setup_EXACTISH_ST(pTHX_ const regnode * const text_node,

/* Add this character to the list of possible matches */
if (utf8_target) {
uv_to_utf8(matches[(U8) m->count], fold_from);
lengths[m->count] = UVCHR_SKIP(fold_from);
uv_to_utf8(matches[ (PERL_UINT_FAST8_T) m->count ], fold_from);
lengths[ (PERL_UINT_FAST8_T) m->count ] = UVCHR_SKIP(fold_from);
m->count++;
}
else { /* Non-UTF8 target: no code point above 255 can appear in it
Expand All @@ -5027,17 +5027,17 @@ S_setup_EXACTISH_ST(pTHX_ const regnode * const text_node,
continue;
}

matches[m->count][0] = fold_from;
lengths[m->count] = 1;
matches[ (PERL_UINT_FAST8_T) m->count ][0] = fold_from;
lengths[ (PERL_UINT_FAST8_T) m->count ] = 1;
m->count++;
}

/* Update min and mlengths */
if (m->min_length > lengths[m->count-1]) {
m->min_length = lengths[m->count-1];
if (m->min_length > lengths[ (PERL_UINT_FAST8_T) m->count - 1 ]) {
m->min_length = lengths[ (PERL_UINT_FAST8_T) m->count - 1 ];
}

if (m->max_length < lengths[m->count-1]) {
if (m->max_length < lengths[ (PERL_UINT_FAST8_T) m->count - 1 ]) {
index_of_longest = m->count - 1;
m->max_length = lengths[index_of_longest];
}
Expand Down
Loading