mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 22:18:30 +00:00
Fix crash when a daily tip has no body text has_cjk() looped while i < text.size() - 2. For a string shorter than two bytes the size_t subtraction wraps, so on an empty string the loop read past the buffer and up the stack until it hit an unmapped page. The Russian translation of the "Reverse on even" tip had lost the \n after its title, so render_text() passed an empty body to has_cjk() every time that tip was shown during slicing. Restore the line break and bound the loop so a translation like this can't crash the app.