diff options
Diffstat (limited to 'src/libs6rc')
-rw-r--r-- | src/libs6rc/s6rc_livedir_create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6rc/s6rc_livedir_create.c b/src/libs6rc/s6rc_livedir_create.c index 4454111..e1fd896 100644 --- a/src/libs6rc/s6rc_livedir_create.c +++ b/src/libs6rc/s6rc_livedir_create.c @@ -32,8 +32,8 @@ int s6rc_livedir_create (stralloc *sa, char const *live, char const *suffix, cha if (!openwritenclose_unsafe(sa->s + sabase, prefix, strlen(prefix))) goto delerr ; strcpy(sa->s + newlen, "state") ; if (!openwritenclose_unsafe(sa->s + sabase, (char const *)state, statelen)) goto delerr ; - sa->len = newlen ; - sa->s[newlen] = 0 ; + sa->len = newlen-1 ; + sa->s[newlen-1] = 0 ; *dirlen = ddirlen ; return 1 ; |