summaryrefslogtreecommitdiff
path: root/sample/count.c
diff options
context:
space:
mode:
Diffstat (limited to 'sample/count.c')
-rw-r--r--sample/count.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sample/count.c b/sample/count.c
index 2b67db7..904101c 100644
--- a/sample/count.c
+++ b/sample/count.c
@@ -59,10 +59,10 @@ test(OnigEncoding enc, OnigMatchParam* mp, char* in_pattern, char* in_str)
tag_len = ulen(enc, tag);
slot = 0;
- r = onig_get_callout_data_by_tag(reg, mp, (UChar* )tag, (UChar* )tag + tag_len,
- slot, 0, &val);
+ r = onig_get_callout_data_by_tag_dont_clear_old(reg, mp, (UChar* )tag,
+ (UChar* )tag + tag_len, slot, 0, &val);
if (r < ONIG_NORMAL) goto err;
- else if (r > ONIG_NORMAL) {
+ else if (r == ONIG_VALUE_IS_NOT_SET) {
fprintf(stdout, "COUNT[x]: NO DATA\n");
}
else {