summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 20ba82b434..bd7ac72aa7 100644
--- a/refs.c
+++ b/refs.c
@@ -1132,8 +1132,8 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
for (i = 0; i < nr_rules; i++) {
assert(offset < total_len);
scanf_fmts[i] = (char *)&scanf_fmts[nr_rules] + offset;
- offset += snprintf(scanf_fmts[i], total_len - offset,
- ref_rev_parse_rules[i], 2, "%s") + 1;
+ offset += xsnprintf(scanf_fmts[i], total_len - offset,
+ ref_rev_parse_rules[i], 2, "%s") + 1;
}
}