diff options
Diffstat (limited to 'src/detached/wire.zig')
| -rw-r--r-- | src/detached/wire.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/detached/wire.zig b/src/detached/wire.zig index 0a066410..2a2ccc6b 100644 --- a/src/detached/wire.zig +++ b/src/detached/wire.zig @@ -254,7 +254,8 @@ pub const Frame = struct { region.notice = try r.getByte(); region.clip = try r.getU16(); region.lift = @bitCast(try r.getU32()); - if (!(region.lift >= 0 and region.lift <= 1)) return error.BadValue; + // A springy flavour overshoots, and a wind-up dips below. + if (!(region.lift >= -1 and region.lift <= 2)) return error.BadValue; if (region.rect.x > f.cols or region.rect.w > f.cols - region.rect.x or region.rect.y > f.rows or region.rect.h > f.rows - region.rect.y or region.clip > region.rect.w or region.thumb_y > region.rect.h or region.thumb_h > region.rect.h - region.thumb_y) return error.BadValue; |
