Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b8253c

Browse files
Fix: a coner case, when all oracles are zero
1 parent6a2c43f commit0b8253c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎blobstamper/galley.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ GalleyVector::extract_internal(Blob &blob)
129129
size_oracles.push_back(o);
130130
size_oracle_total += o;
131131
}
132+
if (size_oracle_total ==0)/* special case: if total size is zero (means all oracles are zero) we will spread data evenly between all items*/
133+
{
134+
for(int i =0; i<count_target; i++)
135+
{
136+
size_oracles[i] =1;
137+
size_oracle_total +=1;
138+
}
139+
}
132140

133141
/* Calculating available vairable size, that will be destributed between parts according to size oracles*/
134142
int data_size = blob.Size();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp