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 | |||
@@ -318,8 +318,7 @@ amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg, | |||
318 | } | 318 | } |
319 | 319 | ||
320 | rc = amd_msg_bsearch (amd, 0, amd->msg_count - 1, msg, &i); | 320 | rc = amd_msg_bsearch (amd, 0, amd->msg_count - 1, msg, &i); |
321 | if (rc == 0) | 321 | *pret = i + 1; |
322 | *pret = i + 1; | ||
323 | return rc; | 322 | return rc; |
324 | } | 323 | } |
325 | 324 | ||