aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/text.h')
-rw-r--r--src/stdlib/text.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/text.h b/src/stdlib/text.h
index 281c1880..75f300eb 100644
--- a/src/stdlib/text.h
+++ b/src/stdlib/text.h
@@ -59,7 +59,7 @@ OptionalText_t Text$cluster(Text_t text, Int_t index_int);
const Text_t text = text_expr; \
Int_t index = index_expr; \
OptionalText_t cluster = Text$cluster(text, index); \
- if (unlikely(cluster.length < 0)) \
+ if (unlikely(!cluster.has_value)) \
fail_source(__SOURCE_FILE__, start, end, "Invalid text index: ", index, " (text has length ", \
(int64_t)text.length, ")\n"); \
cluster; \