aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-23 19:48:34 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-23 19:48:34 +0000
commite034e2889cfb727c5c1d78f356d825ef0b97b915 (patch)
tree1060b289eb843f91517f2744e2ada8a404c8a72e /src
parent498fe127023a62c40c2fc059a73b0cd923ce2c3b (diff)
downloadmpd-e034e2889cfb727c5c1d78f356d825ef0b97b915.tar.gz
mpd-e034e2889cfb727c5c1d78f356d825ef0b97b915.tar.xz
mpd-e034e2889cfb727c5c1d78f356d825ef0b97b915.zip
fix a little logic bomb in commands && notcommands
git-svn-id: https://svn.musicpd.org/mpd/trunk@2739 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c
index 818698fb2..c118be227 100644
--- a/src/command.c
+++ b/src/command.c
@@ -883,7 +883,7 @@ int handleCommands(FILE * fp, unsigned int * permission, int argArrayLength,
while(node != NULL) {
cmd = (CommandEntry *) node->data;
- if(*permission & cmd->reqPermission) {
+ if(*permission || *permission & cmd->reqPermission) {
myfprintf(fp, "command: %s\n", cmd->cmd);
}
@@ -902,7 +902,7 @@ int handleNotcommands(FILE * fp, unsigned int * permission, int argArrayLength,
while(node != NULL) {
cmd = (CommandEntry *) node->data;
- if(!(*permission & cmd->reqPermission)) {
+ if(!(*permission || *permission & cmd->reqPermission)) {
myfprintf(fp, "command: %s\n", cmd->cmd);
}