mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-12 19:06:09 -10:00
`gr_get_string_size` takes a length parameter, but `split_str_once` was calling it with the position instead. This led to incorrect results occasionally. If the incorrect pixel width had the bad luck to be exactly equal to the remaining space, this would cause an infinite loop. This fixes the bug and adds a bunch of safeguards to prevent a similar situation in the future.