lv_demo_benchmark causes floating point exception
higaski opened this issue · comments
Vincent Hamp commented
The function rnd_next in the lv_demo_benchmark causes a floating point exception in line 1007 in case both input arguments are equal.
static int32_t rnd_next(int32_t min, int32_t max)
{
if(min > max) {
int32_t t = min;
min = max;
max = t;
}
int32_t d = max - min;
int32_t r = (rnd_map[rnd_act] % d) + min; // Exception here
rnd_act++;
if(rnd_act >= RND_NUM) rnd_act = 0;
return r;
}
Gabor Kiss-Vamosi commented
This case is handles here:
lv_demos/src/lv_demo_benchmark/lv_demo_benchmark.c
Lines 1004 to 1005 in 1c0552b
Vincent Hamp commented
Oh I'm sorry, I was still checking out v8.0.1... silly me.