diff options
author | Gavin Howard <gavin@yzena.com> | 2021-07-30 22:38:30 -0600 |
---|---|---|
committer | Gavin Howard <gavin@yzena.com> | 2021-07-30 22:38:30 -0600 |
commit | e09c337d25610930ef96566309447587ba22c2a2 (patch) | |
tree | 20329651de79fe25d6ce97673afc2ee684ef7b36 | |
parent | c0d2270f502e15c1240d5ccae080119bed1af5a5 (diff) | |
download | bc-e09c337d25610930ef96566309447587ba22c2a2.tar.gz |
Fix commit dfc16a348f6bcf
That commit fixes an uninitialized data error found by MSan, but it used
the wrong variable for the comparison that it added. This commit keeps
the uninitialized data error fixed, but it uses the right variable.
Signed-off-by: Gavin Howard <gavin@yzena.com>
-rw-r--r-- | src/history.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c index 83577cd7..44fe48ac 100644 --- a/src/history.c +++ b/src/history.c @@ -482,7 +482,7 @@ static size_t bc_history_colPos(const char *buf, size_t buf_len, size_t pos) { size_t ret = 0, off = 0; // While we haven't reached the offset, get the length of the next grapheme. - while (off < pos && pos < buf_len) { + while (off < pos && off < buf_len) { size_t col_len, len; |