2
0

Fix test to match context against question keyword.

This commit is contained in:
Maarten Billemont 2017-10-06 14:58:42 -04:00
parent 81bd2e3065
commit 7150f2f5c5

View File

@ -552,7 +552,7 @@ void cli_question(Arguments __unused *args, Operation *operation) {
case MPKeyPurposeRecovery:
for (size_t q = 0; !operation->question && q < operation->site->questions_count; ++q)
if ((!operation->keyContext && !strlen( (&operation->site->questions[q])->keyword )) ||
(operation->keyContext && strcmp( (&operation->site->questions[q])->keyword, operation->keyContext ) != 0))
(operation->keyContext && strcmp( (&operation->site->questions[q])->keyword, operation->keyContext ) == 0))
operation->question = &operation->site->questions[q];
// If no question from mpsites, create a new one.