Skip to content

Commit f4939ba

Browse files
committed
[[ Bug 16584 ]] Ensure source and pattern marks are in sync when wildcard matching
1 parent cf24b54 commit f4939ba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libfoundation/src/foundation-unicode.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,8 +2322,6 @@ bool MCUnicodeWildcardMatch(const void *source_chars, uindex_t source_length, bo
23222322
// try and match the rest of the source string recursively.
23232323
while (t_source_filter -> HasData())
23242324
{
2325-
t_source_cp = t_source_filter -> GetNextCodepoint();
2326-
23272325
uindex_t t_sindex, t_pindex;
23282326
// if this is a candidate for a match, recurse.
23292327
if (t_source_cp == t_pattern_cp)
@@ -2355,6 +2353,7 @@ bool MCUnicodeWildcardMatch(const void *source_chars, uindex_t source_length, bo
23552353

23562354
// if we don't find a match, eat the source codepoint and continue.
23572355
t_source_filter -> AdvanceCursor();
2356+
t_source_cp = t_source_filter -> GetNextCodepoint();
23582357
}
23592358
}
23602359
return false;

0 commit comments

Comments
 (0)