mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.1.0643: computing byte offset wrong
Problem: Computing byte offset wrong. (Bjorn Linse) Solution: Use the right variable for array index.
This commit is contained in:
@@ -5380,7 +5380,7 @@ ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp)
|
||||
// lengths.
|
||||
len = 0;
|
||||
for (i = start_idx; i <= idx; ++i)
|
||||
len += STRLEN((char_u *)dp + ((dp->db_index[idx]) & DB_INDEX_MASK)) + 1;
|
||||
len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user