Blob Blame History Raw
From 2433fa303dd9925f8b36b18406863c56766c651b Mon Sep 17 00:00:00 2001
From: Matthias Bock <mail@matthiasbock.net>
Date: Thu, 22 Mar 2018 18:30:11 +0100
Subject: [PATCH] Fixed #3: Replaced boolean OR by bitwise OR

---
 src/common/Halftoning.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/common/Halftoning.cpp b/src/common/Halftoning.cpp
index 507a294..6465e96 100644
--- a/src/common/Halftoning.cpp
+++ b/src/common/Halftoning.cpp
@@ -155,13 +155,13 @@ CHalftoneFilter::ExtractRGB(const buffer_t& InputLine, int PixelNo)
     case itXRGB:
       return 
         (int(InputLine[4*PixelNo + 1]) << 16)
-        || (int(InputLine[4*PixelNo + 2]) << 8)
-        || (InputLine[4*PixelNo + 3] );
+        | (int(InputLine[4*PixelNo + 2]) << 8)
+        | (InputLine[4*PixelNo + 3] );
     case itRGB:        
       return 
         (int(InputLine[3*PixelNo + 0]) << 16)
-        || (int(InputLine[3*PixelNo + 1]) << 8)
-        || (InputLine[3*PixelNo + 2] );
+        | (int(InputLine[3*PixelNo + 1]) << 8)
+        | (InputLine[3*PixelNo + 2] );
     default:
       assert(0);        
   }