From 79cef163a1e29ea1fb26506c35f3dfbfc25a7c1e Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 21 Oct 2017 18:05:54 +0200 Subject: [PATCH] fix cast operator precedence --- src/bindings/fluid_ladspa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/fluid_ladspa.c b/src/bindings/fluid_ladspa.c index 38bfe2e6..513818cd 100644 --- a/src/bindings/fluid_ladspa.c +++ b/src/bindings/fluid_ladspa.c @@ -89,7 +89,7 @@ fluid_ladspa_fx_t *new_fluid_ladspa_fx(fluid_real_t sample_rate, int audio_group fx->state = FLUID_LADSPA_INACTIVE; /* add 0.5 to minimize overall casting error */ - fx->sample_rate = (unsigned long)sample_rate + 0.5; + fx->sample_rate = (unsigned long)(sample_rate + 0.5); fx->audio_groups = audio_groups; fx->effects_channels = effects_channels; @@ -176,7 +176,7 @@ int fluid_ladspa_set_sample_rate(fluid_ladspa_fx_t *fx, fluid_real_t sample_rate LADSPA_API_ENTER(fx); /* Add 0.5 to minimize rounding errors */ - new_sample_rate = (unsigned long)sample_rate + 0.5; + new_sample_rate = (unsigned long)(sample_rate + 0.5); if (fx->sample_rate == new_sample_rate) {