Commit 99dfd944 authored by Kirinn's avatar Kirinn

sakueffects-imp: Fix range check error in some bashes

Modulo on a negative number returns a negative result, per spec.
Since I need a positive number, have to use abs.
parent de8cd3c3
......@@ -366,7 +366,7 @@ begin
exit;
end;
// Sanity checks.
direction32k := direction32k mod 32768; // result: angle 0..32767
direction32k := abs(direction32k mod 32768); // result: angle 0..32767
if freq32k < 0 then begin
direction32k := direction32k xor $4000;
freq32k := abs(freq32k);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment