Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index 814cad316384f953be975cdb711e320b4f1290d3..b4e7cac7b26d0903c4ab7361430c38232c1d5e82 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -922,7 +922,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
                        /* -2 for strlen("%.*s") - strlen("%s"); +1 for NUL */
                        total_len += strlen(ref_rev_parse_rules[nr_rules]) - 2 + 1;
 
-               scanf_fmts = xmalloc(st_add(st_mult(nr_rules, sizeof(char *)), total_len));
+               scanf_fmts = xmalloc(st_add(st_mult(sizeof(char *), nr_rules), total_len));
 
                offset = 0;
                for (i = 0; i < nr_rules; i++) {