diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-18 09:59:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-18 09:59:13 +0000 |
commit | 235b40f1bb36006b01cd45b3fe9605570b5d8a6d (patch) | |
tree | 8cd31f60d4811d7dc6eb09f47da8b226686ebf3c /usr.bin/vi/common/api.c | |
parent | df2140f19b8e88fbcef5748d92fcf72f447586b1 (diff) |
vi fixes from bostic
Diffstat (limited to 'usr.bin/vi/common/api.c')
-rw-r--r-- | usr.bin/vi/common/api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/common/api.c b/usr.bin/vi/common/api.c index cef2dd94057..bf90d1c717e 100644 --- a/usr.bin/vi/common/api.c +++ b/usr.bin/vi/common/api.c @@ -398,7 +398,7 @@ api_opts_get(sp, name, value) switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: - MALLOC_RET(sp, *value, char *, strlen(op->name) + 2); + MALLOC_RET(sp, *value, char *, strlen(op->name) + 2 + 1); (void)sprintf(*value, "%s%s", O_ISSET(sp, offset) ? "" : "no", op->name); break; @@ -412,7 +412,7 @@ api_opts_get(sp, name, value) value[0] = '\0'; } else { MALLOC_RET(sp, - *value, char *, strlen(O_STR(sp, offset))); + *value, char *, strlen(O_STR(sp, offset)) + 1); (void)sprintf(*value, "%s", O_STR(sp, offset)); } break; |