mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
Welcome: Remove crash and ensure text doesn't all stay on one line.
When size_t replaced int (6f4c370), it caused the 'start = -1' trick to fail, setting start to (unsigned)-1 instead. This then caused String.substring to fail, as that is a little bit higher than the length of the string! This resulted in an outright crash. Later, the builder is not reset before making a new line. This causes the line to simply be the earlier one, but with more text on it. (There's also a few changes from clang-format, namely the #include reorganization.) Fixes #1211 (although I wasn't aware of it when I made this commit).
This commit is contained in:
parent
f27a646bf5
commit
d647749737
2 changed files with 4 additions and 3 deletions
|
@ -28,8 +28,8 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
|
||||
class TextWidget : public GUI::Frame {
|
||||
C_OBJECT(TextWidget)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue