summaryrefslogtreecommitdiff
path: root/src/icecc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/icecc.cc')
-rw-r--r--src/icecc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/icecc.cc b/src/icecc.cc
index 967488e..91956c6 100644
--- a/src/icecc.cc
+++ b/src/icecc.cc
@@ -232,9 +232,9 @@ private:
for (auto const& machine : machines_) {
auto const x = pad_x_ + col * (box_width_ + pad_x_);
auto const bx = static_cast<int16_t>(x);
- auto const by = static_cast<int16_t>(y);
+ auto const by = static_cast<int16_t>(std::max(0.0, y - 1.0));
auto const bw = static_cast<uint16_t>(box_width_ + 1);
- auto const bh = static_cast<uint16_t>(box_height_c_ + 1);
+ auto const bh = static_cast<uint16_t>(box_height_c_ + 2);
if (machine->dirty) {
machine->dirty = false;