Skip to content

Commit

Permalink
enh: speedup RS03 repair (fixes #100)
Browse files Browse the repository at this point in the history
  • Loading branch information
speed47 committed Aug 2, 2024
1 parent aa9065f commit 5c75ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rs03-fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c75ea5

Please sign in to comment.