diff options
| author | Albert Cervin <albert@acervin.com> | 2024-01-26 08:44:32 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-01-26 08:44:32 +0100 |
| commit | 1a5946eca41fbe33df17efc933fa33574af3c3a9 (patch) | |
| tree | bee2f57bbbc5803edabb8d09938fae2217af9b98 | |
| parent | f384a3826bae1eb9f500ad6b9dbaa5f904dfbf42 (diff) | |
| download | dged-1a5946eca41fbe33df17efc933fa33574af3c3a9.tar.gz dged-1a5946eca41fbe33df17efc933fa33574af3c3a9.tar.xz dged-1a5946eca41fbe33df17efc933fa33574af3c3a9.zip | |
Fix clamp using column instead of line
| -rw-r--r-- | src/dged/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dged/buffer.c b/src/dged/buffer.c index 7eb4b00..733d4a4 100644 --- a/src/dged/buffer.c +++ b/src/dged/buffer.c @@ -581,7 +581,7 @@ struct location buffer_clamp(struct buffer *buffer, int64_t line, int64_t col) { } } else { location.line = line; - uint32_t nchars = buffer_num_chars(buffer, location.col); + uint32_t nchars = buffer_num_chars(buffer, location.line); location.col = col > nchars ? nchars : col; } |
