From 5c75ea5e9b464f44a59b3ed35d6d675acb48d84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Fri, 2 Aug 2024 23:49:31 +0200 Subject: [PATCH] enh: speedup RS03 repair (fixes #100) --- src/rs03-fix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rs03-fix.c b/src/rs03-fix.c index 33c26c6..cd10394 100644 --- a/src/rs03-fix.c +++ b/src/rs03-fix.c @@ -734,7 +734,7 @@ void RS03Fix(Image *image) if(num1 != 0) { int location = loc[j]; - if(erasure_map[location] != 1) /* erasure came from CRC error */ + if((Closure->debugMode || Closure->regtestMode) && erasure_map[location] != 1) /* erasure came from CRC error */ { int old = fc->imgBlock[location][offset]; int new = old ^ gf_alpha_to[mod_fieldmax(gf_index_of[num1] + gf_index_of[num2] + GF_FIELDMAX - gf_index_of[den])]; char *msg, *type;