From f43b1038a21c1339c2fa1279409080943980b165 Mon Sep 17 00:00:00 2001
From: Tom Harkness <tomharkness@SilverBox-2.local>
Date: Thu, 22 Feb 2018 23:38:53 +1100
Subject: [PATCH] fix for swapped parity bits

---
 client/scripts/lf_bulk_program.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/scripts/lf_bulk_program.lua b/client/scripts/lf_bulk_program.lua
index 4758c203..274f7510 100644
--- a/client/scripts/lf_bulk_program.lua
+++ b/client/scripts/lf_bulk_program.lua
@@ -61,8 +61,8 @@ local function cardHex(i,f)
 
 	--As the function defaults to even parity and returns a boolean,
 	--perform a 'not' function to get odd parity
-	high = evenparity(string.sub(stream,0,12)) and 1 or 0
-	low = not evenparity(string.sub(stream,13)) and 1 or 0
+	high = not evenparity(string.sub(stream,0,12)) and 1 or 0
+	low =  evenparity(string.sub(stream,13)) and 1 or 0
 	bits = bit32.bor(bit32.lshift(id,1), low)
 	bits = bit32.bor(bits, bit32.lshift(high,25))
 
-- 
2.39.5