Terminating a buffer string (can't remember when I did that, no time to check but shouldn't hurt)

This commit is contained in:
Pierre Pronchery 2004-06-04 20:05:34 +00:00
parent fb28e7fe07
commit e44f258bff

View File

@ -62,6 +62,7 @@ static int _pwd(pwd_flag pf)
perror("getcwd"); perror("getcwd");
return 2; return 2;
} }
buf[255] = '\0';
pwd = buf; pwd = buf;
} }
printf("%s\n", pwd); printf("%s\n", pwd);