From 03bb6dffa68893a9a577ec9e865f5ca4ecff9f3f Mon Sep 17 00:00:00 2001
From: echicken <echicken@bbs.electronicchicken.com>
Date: Wed, 7 Dec 2016 17:45:05 -0500
Subject: [PATCH] Proper comparison of POLL_RESULTS stuff in header.auxattr

---
 web/lib/forum.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/web/lib/forum.js b/web/lib/forum.js
index 0341efddf1..e9e16158a0 100644
--- a/web/lib/forum.js
+++ b/web/lib/forum.js
@@ -201,13 +201,14 @@ function getUserPollData(sub, id) {
         msgBase.cfg.settings&SUB_NAME ? user.name : user.alias
     );
     msgBase.close();
+    var pollAttr = header.auxattr&POLL_RESULTS_MASK;
     if (header.from === user.alias || header.from === user.name) {
         ret.show_results = true;
-    } else if (header.auxattr&POLL_RESULTS_CLOSED && header.auxattr&POLL_CLOSED) {
+    } else if (pollAttr === POLL_RESULTS_CLOSED && header.auxattr&POLL_CLOSED) {
         ret.show_results = true;
-    } else if (header.auxattr&POLL_RESULTS_OPEN) {
+    } else if (pollAttr === POLL_RESULTS_OPEN) {
         ret.show_results = true;
-    } else if (header.auxattr&POLL_RESULTS_VOTERS && ret.answers > 0) {
+    } else if (pollAttr === POLL_RESULTS_VOTERS && ret.answers > 0) {
         ret.show_results = true;
     }
     return ret;
-- 
GitLab