aboutsummaryrefslogtreecommitdiff
path: root/core/text
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-04-06 21:13:02 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-04-06 21:13:02 +0200
commit66077add3375d89c15d986e58a845c9f0b70b3df (patch)
treea6b3675b3f2af19676e7c0992bf9a28a36203a42 /core/text
parent07a79254e0dc047056940c0d761a8af023e8ed8f (diff)
{.Glboal} implicit in regex allocator.
Diffstat (limited to 'core/text')
-rw-r--r--core/text/regex/regex.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/text/regex/regex.odin b/core/text/regex/regex.odin
index b0837ac14..1ad582a4f 100644
--- a/core/text/regex/regex.odin
+++ b/core/text/regex/regex.odin
@@ -279,6 +279,8 @@ create_iterator :: proc(
permanent_allocator := context.allocator,
temporary_allocator := context.temp_allocator,
) -> (result: Match_Iterator, err: Error) {
+ flags := flags
+ flags += {.Global} // We're iterating over a string, so the next match could start anywhere
result.haystack = str
result.regex = create(pattern, flags, permanent_allocator, temporary_allocator) or_return