summaryrefslogtreecommitdiffhomepage
path: root/types.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-03 11:26:31 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-03 17:04:05 +0100
commit5d0ecd9aefee1be2b51713f7343939b7039a0406 (patch)
treeedcb38ac395e2444dab71b3691317c8e259130ae /types.c
parent3ad57f116631029263cdbb324a20076006a94d4c (diff)
lib: fix infinite loop on empty regexp matches in uc_replace()
The regular expression `/()/` will match the empty string, causing the match loop to never advance. Add extra logic to deal with this case, similar to the empty separator string logic. Apply a similar exception to replacements of empty search strings, those should yield the same result as empty regexp matches. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'types.c')
0 files changed, 0 insertions, 0 deletions