npm

Nihal's Password Manager
git clone git://git.nihaljere.xyz/npm
Log | Files | Refs | README | LICENSE

commit 6768e1c043416fec785e4e9a7c271ca53f98c07a
parent 254671c6e1b9a5e2fda28ace48b24feee32e46a0
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Wed, 12 Jul 2023 22:13:42 -0500

fix get_password

I forgot that get_password is used in npm-core as well, so now
we treat either \n or EOF as the end of the password input, trimming
\n if EOF is the end

Diffstat:
Mutil.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/util.c b/util.c @@ -34,6 +34,8 @@ get_password(FILE *f, char *buf) return ptr - buf - 1; else return ptr - buf; + } else if (ret == '\n') { + return ptr - buf; } *(ptr++) = ret;