summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-07-21 23:12:02 +0000
committerMiles Bader <miles@gnu.org>1997-07-21 23:12:02 +0000
commit4ea76ef7b236bea87b08ebb68cc36806d826619a (patch)
tree68dd0be093aed5c02d560f25eb5029637d3c3a40
parent4b0c6a3489ee1e7f25244d5da6851e1e9b9d634e (diff)
(store_parsed_append_args):
Correctly unparse complex type names.
-rw-r--r--libstore/argp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libstore/argp.c b/libstore/argp.c
index 07bba996..4d944107 100644
--- a/libstore/argp.c
+++ b/libstore/argp.c
@@ -93,15 +93,15 @@ store_parsed_append_args (const struct store_parsed *parsed,
if (!err && parsed->type != parsed->default_type)
if (parsed->name_prefix)
- /* A name prefix of "PFX:" is equivalent to appending ":PFX" to the
+ /* A name prefix of "PFX" is equivalent to appending ":PFX" to the
type name. */
{
size_t npfx_len = strlen (parsed->name_prefix);
char tname[strlen ("--store-type=")
- + strlen (parsed->type->name) + 1 + npfx_len - 1 + 1];
+ + strlen (parsed->type->name) + 1 + npfx_len + 1];
snprintf (tname, sizeof tname, "--store-type=%s:%.*s",
- parsed->type->name, npfx_len - 1, parsed->name_prefix);
- err = argz_add (args, args_len, buf);
+ parsed->type->name, npfx_len, parsed->name_prefix);
+ err = argz_add (args, args_len, tname);
}
else
/* A simple type name. */