diff options
author | Mattias Andrée <maandree@kth.se> | 2023-02-08 22:07:36 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-02-08 22:07:36 +0100 |
commit | 73184638615c27a4e190c6a902a2f29729ee45ff (patch) | |
tree | 48195415c773990d48c24ffc6d708f54c95bdba3 | |
parent | Test lines.c (diff) | |
download | librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-73184638615c27a4e190c6a902a2f29729ee45ff.tar.gz librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-73184638615c27a4e190c6a902a2f29729ee45ff.tar.bz2 librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-73184638615c27a4e190c6a902a2f29729ee45ff.tar.xz |
Fix out of bounds error in drawing of vertical lines
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | lines.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -50,6 +50,8 @@ draw_vertical_line(RASTER *restrict raster, double x1, double y1, double y2, int start = (size_t)y1; end = (size_t)y2; + start -= (size_t)(start == raster->height); + end -= (size_t)(end == raster->height); y = start; if (ydir > 0) { |