diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-10-01 17:02:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-10-01 17:02:43 +0300 |
commit | b9f3a3d90f09668bb6c131f94bcd4c91e83a44b1 (patch) | |
tree | 64b60a2dc4862188fb97459209ff5a2705e8f882 | |
parent | 7de713903958175e87c1f7c4967ef449ed749e7e (diff) | |
download | mailutils-b9f3a3d90f09668bb6c131f94bcd4c91e83a44b1.tar.gz mailutils-b9f3a3d90f09668bb6c131f94bcd4c91e83a44b1.tar.bz2 |
Bugfix
* libmailutils/base/amd.c (amd_msg_lookup): Always store the index
of the memory slot, as described in the comment. This was broken in
1274d937 in a fit of overcorrectness.
-rw-r--r-- | libmailutils/base/amd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c index b1a428e46..8a7ee9b68 100644 --- a/libmailutils/base/amd.c +++ b/libmailutils/base/amd.c @@ -315,14 +315,13 @@ amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg, { *pret = amd->msg_count; return 0; } rc = amd_msg_bsearch (amd, 0, amd->msg_count - 1, msg, &i); - if (rc == 0) - *pret = i + 1; + *pret = i + 1; return rc; } #define AMD_MSG_INC 64 /* Prepare the message array for insertion of a new message |