"consistency"
This commit is contained in:
RadsammyT 2025-12-01 00:00:42 -05:00
commit 5c31b8bcb8
No known key found for this signature in database
GPG key ID: 07BAADCA8A7D4F1E

View file

@ -28,7 +28,7 @@ pub const Input = enum {
const selfNum = @intFromEnum(self.*);
if (reverse) {
if (wrap) {
self.* = @as(Input, @enumFromInt(@intFromEnum(self.*) -% 1));
self.* = @as(Input, @enumFromInt(selfNum -% 1));
} else if (selfNum != 0) {
self.* = @as(Input, @enumFromInt(std.math.clamp(selfNum - 1, 0, len)));
}