mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-28 06:57:02 -04:00
BE swap shop params, fix shop cursor projection, handle divide by zero in d_vibration, stub startLevelSound audio func
This commit is contained in:
@@ -25,7 +25,12 @@ u16* makedata(u16* data, u32 pattern, s32 length) {
|
||||
}
|
||||
|
||||
s32 rollshift(u32 pattern, s32 length, s32 index) {
|
||||
#if AVOID_UB
|
||||
if (length == 0)
|
||||
index = 0;
|
||||
#else
|
||||
index %= length;
|
||||
#endif
|
||||
return (pattern >> index) | (pattern << (length - index));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user