On 12/02/2011 08:00 PM, Michael Hunold wrote:
Hello all,

using DirectFB 1.4.15 and DirectFB-examples-1.2.0 from buildroot-2011.11
on an ARM926EJS-based platform "df_dok --draw-string" is crashing with a
"Floating point exception" for me.

The offending code can be found in draw_string() and
draw_string_blend(). For my system, "SW" (screen width) is 320 and by
lucky chance "stringwidth" is 320 as well.

The calculation "myrand() % (SW-stringwidth)" then produces the floating
point exception, because (SW-stringwidth) is 0 ...

The attached patch for DirectFB-examples-1.2.0 changes the code so that
it checks if (SW-stringwidth) is>  0 and if not, uses 0 instead.

The bug is present in the Git version of df_dok as well.

Your patch is finally applied, thanks!

--
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to