mainui_cpp
mainui_cpp copied to clipboard
UI_DrawString can get stuck until integer overflow if bounds are too small
I noticed after neglecting to set a size for a table view that the menu would take up to 10 seconds to render a single frame. After some investigation I worked out that it was UI_DrawString that was being slow. I think that because the height of the table view was less than the height of the font, the function got stuck in an infinite loop and kept "wrapping" the line/increasing the value of yy until it overflowed, thereby eventually failing the check if ( yy < (yy + h) - charH ).
Thanks for the report! I will look into it, as soon as throw off an illness and get back to my workstation.