summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/regularexpressions/regex_match.c
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-08-17 05:34:38 +0200
committerTyge Lovset <[email protected]>2023-08-17 05:34:38 +0200
commitbe0e64a9a19d3ca459284c61c497d141a78df1d7 (patch)
treee2005e0a29d9e7386647ad9d92411635d01574c6 /misc/examples/regularexpressions/regex_match.c
parent2ba238e66efec7b6d895425c4f1160b3b72d242b (diff)
downloadSTC-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/examples/regularexpressions/regex_match.c')
-rw-r--r--misc/examples/regularexpressions/regex_match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/examples/regularexpressions/regex_match.c b/misc/examples/regularexpressions/regex_match.c
index 11426d2d..9106ffbd 100644
--- a/misc/examples/regularexpressions/regex_match.c
+++ b/misc/examples/regularexpressions/regex_match.c
@@ -22,7 +22,7 @@ int main(void)
// extract and convert all numbers in str to floats
c_formatch (i, &re, str)
- cstack_float_push(&vec, (float)atof(i.match[0].str));
+ cstack_float_push(&vec, (float)atof(i.match[0].buf));
c_foreach (i, cstack_float, vec)
printf(" %g\n", (double)*i.ref);