diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-12-30 12:30:11 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-01 20:09:37 +0000 |
| commit | a8496eef037d063555e8e7dbe9094cb955ae6897 (patch) | |
| tree | 2fa4fef333093346456df46dff1e0286038b642f | |
| parent | box-drawing: make sure we never walk outside the (image) buffer (diff) | |
box-drawing: thickness(): ensure thickness is *at least* 1px
| -rw-r--r-- | box-drawing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/box-drawing.c b/box-drawing.c index b368210a..8584f8ad 100644 --- a/box-drawing.c +++ b/box-drawing.c @@ -18,7 +18,7 @@ static int thickness(float pts, int dpi) { - return pts * (float)dpi / 72.0; + return max(pts * (float)dpi / 72.0, 1); } static void |
