(doit): Fix reading of `y/n'.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1937 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-06-30 04:08:11 +00:00
parent 0bffe4dacc
commit 96dfdb4c86

View File

@@ -66,7 +66,9 @@ doit(char *principal, int mod)
while(mod){
fprintf(stderr, "Change password? (y/n) ");
fgets(buf, sizeof(buf), stdin);
if(buf[0] != 'n' || buf[0] != 'y'){
if(buf[0] == 'n' || buf[0] == 'y')
break;
else {
fprintf(stderr, "Please answer yes or no.\n");
continue;
}