mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-12-05 21:27:13 -06:00
fix checkpoint loading (use carry for add)
This commit is contained in:
7
main.c
7
main.c
@@ -612,8 +612,11 @@ int main(int argc,char **argv)
|
||||
fclose(checkout);
|
||||
|
||||
// Apply checkpoint to determseed
|
||||
for (int i = 0; i < SEED_LEN; i++)
|
||||
determseed[i] += checkpoint[i];
|
||||
bool carry = 0;
|
||||
for (int i = 0; i < SEED_LEN; i++) {
|
||||
determseed[i] += checkpoint[i] + carry;
|
||||
carry = determseed[i] < checkpoint[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user