summaryrefslogtreecommitdiff
path: root/package/config/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/config/util.c')
-rw-r--r--package/config/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/config/util.c b/package/config/util.c
index c3821407d..b15dbab33 100644
--- a/package/config/util.c
+++ b/package/config/util.c
@@ -199,12 +199,13 @@ int file_write_dep(const char *name)
}
-/* Allocate initial growable sting */
+/* Allocate initial growable string */
struct gstr str_new(void)
{
struct gstr gs;
gs.s = malloc(sizeof(char) * 64);
gs.len = 64;
+ gs.max_width = 0;
strcpy(gs.s, "\0");
return gs;
}
@@ -215,6 +216,7 @@ struct gstr str_assign(const char *s)
struct gstr gs;
gs.s = strdup(s);
gs.len = strlen(s) + 1;
+ gs.max_width = 0;
return gs;
}