summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/regularexpressions/regex_replace.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/regularexpressions/regex_replace.c')
-rw-r--r--misc/examples/regularexpressions/regex_replace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/examples/regularexpressions/regex_replace.c b/misc/examples/regularexpressions/regex_replace.c
index f1ea2711..087387d7 100644
--- a/misc/examples/regularexpressions/regex_replace.c
+++ b/misc/examples/regularexpressions/regex_replace.c
@@ -5,7 +5,7 @@
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;
}