Write zero after writing current working directory in powerline.c

This commit is contained in:
ZyX 2014-08-10 15:56:32 +04:00
parent 310af9ae75
commit 6f550fce8b
1 changed files with 3 additions and 1 deletions

View File

@ -106,8 +106,10 @@ int main(int argc, char *argv[]) {
wd = getcwd(NULL, 0);
if (wd != NULL) {
do_write(sd, wd, strlen(wd));
free(wd); wd = NULL;
free(wd);
wd = NULL;
}
do_write(sd, eof, 1);
for(envp=environ; *envp; envp++) {
do_write(sd, *envp, strlen(*envp));