This fixes a bug discovered when passing a new insufficient fragments exception

up through Python.

The code that preprocesses decoded fragments to see if it can simply concat
the data fragments instead of decodeing was not properly deduping fragments,
which leads to a failed assertion.

This properly dedups fragments in the fragments_to_string function.
This commit is contained in:
Kevin Greenan 2015-07-12 09:34:17 -07:00
parent 0d876a2ef1
commit 73d7914f1b
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ int fragments_to_string(int k, int m,
continue;
} else {
/* Make sure we account for duplicates */
if (NULL != fragments[index]) {
if (NULL == data[index]) {
data[index] = fragments[i];
num_data++;
}