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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stdlib/text.h b/src/stdlib/text.h
index 9ad7441c..776ea8ec 100644
--- a/src/stdlib/text.h
+++ b/src/stdlib/text.h
@@ -63,8 +63,9 @@ OptionalText_t Text$cluster(Text_t text, Int_t index_int);
Int_t index = index_expr; \
OptionalText_t cluster = Text$cluster(text, index); \
if (unlikely(cluster.tag == TEXT_NONE)) \
- fail_source(__SOURCE_FILE__, start, end, "Invalid text index: ", index, " (text has length ", \
- (int64_t)text.length, ")\n"); \
+ fail_source(__SOURCE_FILE__, start, end, \
+ Text$concat(Text("Invalid text index: "), convert_to_text(index), Text(" (text has length "), \
+ convert_to_text((int64_t)text.length), Text(")\n"))); \
cluster; \
})
OptionalText_t Text$from_str(const char *str);