From b7b8ab0bce0eee864e2bece65faa9ce2020e4879 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sun, 3 Jul 2022 16:47:09 +0200 Subject: [PATCH] fix: idk, might work? --- src/chunk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chunk.rs b/src/chunk.rs index 2e7b9e6..21337ee 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -6,7 +6,7 @@ use pyo3::{exceptions::PyValueError, prelude::*}; fn abs(v:i32, modulo:i32) -> i32 { if v < 0 { - return modulo + (v % modulo); + return (modulo + (v % modulo)) % modulo; } else { return v % modulo; }