summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-02-27 21:54:11 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-02-27 21:54:11 +0100
commita2f21d73d0e339975d3af0b0679b3dfc0aaf6c75 (patch)
treecab008a90404f6e2e42800737c379e52a90d0eed
parent0ae261fdb4e1a0ba2a34d57d7aaef70436be7e61 (diff)
downloadlr-a2f21d73d0e339975d3af0b0679b3dfc0aaf6c75.tar.gz
lr-a2f21d73d0e339975d3af0b0679b3dfc0aaf6c75.tar.xz
lr-a2f21d73d0e339975d3af0b0679b3dfc0aaf6c75.zip
clean up code for setting flags
-rw-r--r--lr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lr.c b/lr.c
index dc31d6c..02d092e 100644
--- a/lr.c
+++ b/lr.c
@@ -264,7 +264,7 @@ doit:
 		switch (op) {
 		case '-': newmode &= ~(whom & what); break;
 		case '+': newmode |= (whom & what); break;
-		case '=': newmode &= ~whom; newmode |= (whom & what); break;
+		case '=': newmode = (newmode & ~whom) | (whom & what); break;
 		}
 	} while (*c == ',' && c++);