diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 23:47:16 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 23:47:16 -0400 |
| commit | 5aa5a5e99b322586eed9997a14b3d616540bef07 (patch) | |
| tree | c8eede952aa9ff49cea8f981d48e0b5faad291b2 /builtins/functions.c | |
| parent | 5d6fa135b1eadbceac04e5456fabb7e53feedc10 (diff) | |
Fix some stuff around Text:find() and text indexing
Diffstat (limited to 'builtins/functions.c')
| -rw-r--r-- | builtins/functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index 06636cba..4aa699a5 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -218,7 +218,7 @@ public void end_test(void *expr, const TypeInfo *type, const char *expected, con Text_t expr_plain = USE_COLOR ? generic_as_text(expr, false, type) : expr_text; bool success = Text$equal(&expr_plain, &expected_text); if (!success) { - Int_t colon = Text$find(expected_text, Text$from_str(":"), I_small(0), NULL); + Int_t colon = Text$find(expected_text, Text$from_str(":"), I_small(1), NULL); if (colon.small != I_small(0).small) { Text_t with_type = Text$concat(expr_plain, Text$from_str(" : "), type_name); success = Text$equal(&with_type, &expected_text); |
