mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
return -1 if location is before data
This commit is contained in:
parent
e660ae8c39
commit
ab44dc4042
2 changed files with 9 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ public:
|
|||
int count = algorithm(syndromes, locations, magnitudes, erasures, erasures_count);
|
||||
if (count <= 0)
|
||||
return count;
|
||||
for (int i = 0; i < count; ++i)
|
||||
if ((int)locations[i] < K - data_len)
|
||||
return -1;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
int idx = (int)locations[i] + data_len - K;
|
||||
if (idx < data_len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue