From 39c1eb0fffd6e1f5dff168f98b5848a975db9d31 Mon Sep 17 00:00:00 2001 From: Zilog80 Date: Mon, 19 Dec 2016 01:21:18 +0100 Subject: [PATCH] RS41: BCH/Reed-Solomon --- rs41/rs41ecc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rs41/rs41ecc.c b/rs41/rs41ecc.c index 0655520..af9a693 100644 --- a/rs41/rs41ecc.c +++ b/rs41/rs41ecc.c @@ -906,9 +906,6 @@ int rs41_ecc(int msglen) { errors1 = rs_decode(cw1, err_pos1, err_val1); errors2 = rs_decode(cw2, err_pos2, err_val2); - if (errors1 > 0 || errors2 > 0) { - ret = errors1+errors2; - } // check CRC32 // CRC32 OK: @@ -925,6 +922,7 @@ int rs41_ecc(int msglen) { frame[cfg_rs41.msgpos+2*i] = cw1[rs_R+i]; } + ret = errors1 + errors2; if (errors1 < 0 || errors2 < 0) ret = -1;