Skip to content

Commit

Permalink
Trying to fix Multiplication result converted to larger type
Browse files Browse the repository at this point in the history
  • Loading branch information
patheros committed Jul 10, 2022
1 parent 136f440 commit fd3eee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ShiftyMod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ struct ShiftyMod : Module {
{
float echo = params[ECHO_PARAMS + row].getValue() + bridge.echo[row];
if(!hit && echo > 0.f){
int idx = (int)floor(delay * (1.f + (abs(1.f - echo * 2.f))) * HIT_QUEUE_SCALAR);
int idx = (int)floor(delay * (1.f + (abs(1.f - echo * 2.f))) * static_cast<long>(HIT_QUEUE_SCALAR));
idx = idx % HIT_QUEUE_FULL_SIZE;
if(idx < 0) idx += HIT_QUEUE_FULL_SIZE;
hit = hitQueue[idx];
Expand Down

0 comments on commit fd3eee8

Please sign in to comment.