summaryrefslogtreecommitdiffhomepage
path: root/misc/tests/cregex_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/tests/cregex_test.c')
-rw-r--r--misc/tests/cregex_test.c4
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;
}