ubase

suckless linux base utils
git clone git://git.suckless.org/ubase
Log | Files | Refs | README | LICENSE

commit bf9dfd7b2968187e2003ebb87bc28a4cf770c10b
parent 60b1cc522e4875d153325eae6e17ae259c8c4dd5
Author: sin <sin@2f30.org>
Date:   Sat, 26 Jul 2014 15:51:21 +0100

Only "y" and "n" are valid, nothing else

Good catch FRIGN.

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

diff --git a/mesg.c b/mesg.c @@ -39,9 +39,9 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } - if (argv[0][0] == 'y') + if (argv[0][0] == 'y' && argv[0][1] == '\0') mode = sb.st_mode | S_IWGRP | S_IWOTH; - else if (argv[0][0] == 'n') + else if (argv[0][0] == 'n' && argv[0][1] == '\0') mode = sb.st_mode & ~(S_IWGRP | S_IWOTH); else usage();