From f6842317960fbf41cf981171789daebec8dbf803 Mon Sep 17 00:00:00 2001 From: AntiCat Date: Tue, 21 Aug 2018 05:08:06 +0200 Subject: [PATCH] Legic: fixed write (#655) Due to an oversight the bytes to be written were fetched from the wrong location. This is fixed now. --- armsrc/legicrf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/legicrf.c b/armsrc/legicrf.c index a611c741..2a236b6f 100644 --- a/armsrc/legicrf.c +++ b/armsrc/legicrf.c @@ -476,7 +476,7 @@ void LegicRfWriter(int bytes, int offset) { // write in reverse order, only then is DCF (decremental field) writable while(bytes-- > 0 && !BUTTON_PRESS()) { - if(!write_byte(bytes + offset, BigBuf[bytes], card.addrsize)) { + if(!write_byte(bytes + offset, BigBuf[bytes + offset], card.addrsize)) { Dbprintf("operation failed @ 0x%03.3x", bytes); goto OUT; } -- 2.39.5