diff options
| author | Tyge Lovset <[email protected]> | 2023-08-17 05:34:38 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-08-17 05:34:38 +0200 |
| commit | be0e64a9a19d3ca459284c61c497d141a78df1d7 (patch) | |
| tree | e2005e0a29d9e7386647ad9d92411635d01574c6 /misc/tests | |
| parent | 2ba238e66efec7b6d895425c4f1160b3b72d242b (diff) | |
| download | STC-modified-be0e64a9a19d3ca459284c61c497d141a78df1d7.tar.gz STC-modified-be0e64a9a19d3ca459284c61c497d141a78df1d7.zip | |
Renamed "internal" csview member .str => .buf, as it is not null terminated like crawstr .str member.
Diffstat (limited to 'misc/tests')
| -rw-r--r-- | misc/tests/cregex_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/tests/cregex_test.c b/misc/tests/cregex_test.c index 4e192de6..a83b7593 100644 --- a/misc/tests/cregex_test.c +++ b/misc/tests/cregex_test.c @@ -4,7 +4,7 @@ #include <stc/algo/raii.h> #include "ctest.h" -#define M_START(m) ((m).str - inp) +#define M_START(m) ((m).buf - inp) #define M_END(m) (M_START(m) + (m).size) @@ -238,7 +238,7 @@ CTEST(cregex, captures_cap) static bool add_10_years(int i, csview match, cstr* out) { if (i == 1) { // group 1 matches year int year; - sscanf(match.str, "%4d", &year); // scan 4 chars only + sscanf(match.buf, "%4d", &year); // scan 4 chars only cstr_printf(out, "%04d", year + 10); return true; } |
