Fix user-provided keys handling
This makes mfoc try user-provided keys even if the built-in ones are removed from the code (for efficiency).
This commit is contained in:
parent
b872a328e3
commit
f3ebde09ef
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ int main(int argc, char *const argv[])
|
||||||
n = sizeof(defaultKeys) / sizeof(defaultKeys[0]);
|
n = sizeof(defaultKeys) / sizeof(defaultKeys[0]);
|
||||||
size_t defKey_bytes_todo = defKeys_len;
|
size_t defKey_bytes_todo = defKeys_len;
|
||||||
key = 0;
|
key = 0;
|
||||||
while (key < n) {
|
while (key < n || defKey_bytes_todo) {
|
||||||
if (defKey_bytes_todo > 0) {
|
if (defKey_bytes_todo > 0) {
|
||||||
memcpy(mp.mpa.abtKey, defKeys + defKeys_len - defKey_bytes_todo, sizeof(mp.mpa.abtKey));
|
memcpy(mp.mpa.abtKey, defKeys + defKeys_len - defKey_bytes_todo, sizeof(mp.mpa.abtKey));
|
||||||
defKey_bytes_todo -= sizeof(mp.mpa.abtKey);
|
defKey_bytes_todo -= sizeof(mp.mpa.abtKey);
|
||||||
|
|
Loading…
Reference in a new issue