You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Fix crash caused by trailing spaces
This commit is contained in:
@@ -713,6 +713,14 @@ TEST_CASE("[String] Splitting") {
|
||||
CHECK(l[i] == slices[i]);
|
||||
}
|
||||
}
|
||||
{
|
||||
const String s = "Mars Jupiter Saturn Uranus";
|
||||
const char *slices[2] = { "Mars", "Jupiter Saturn Uranus" };
|
||||
Vector<String> l = s.split_spaces(1);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
CHECK(l[i] == slices[i]);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const String s = "1.2;2.3 4.5";
|
||||
|
||||
Reference in New Issue
Block a user