summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rule.c b/src/rule.c
index 3df1780..534526c 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -469,7 +469,7 @@ static int nft_rule_snprintf_xml(char *buf, size_t size, struct nft_rule *r,
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}
- ret = snprintf(buf+offset-1, len, "\n</rule>\n ");
+ ret = snprintf(buf+offset, len, "\n</rule>\n ");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return ret;