Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/string/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,9 @@ Vector<double> String::split_floats(const String &p_splitter, bool p_allow_empty
Vector<double> ret;
int from = 0;
int len = length();
if (len == 0) {
return ret;
}

String buffer = *this;
while (true) {
Expand Down Expand Up @@ -1223,6 +1226,9 @@ Vector<float> String::split_floats_mk(const Vector<String> &p_splitters, bool p_
Vector<float> ret;
int from = 0;
int len = length();
if (len == 0) {
return ret;
}

String buffer = *this;
while (true) {
Expand Down Expand Up @@ -1255,6 +1261,9 @@ Vector<int> String::split_ints(const String &p_splitter, bool p_allow_empty) con
Vector<int> ret;
int from = 0;
int len = length();
if (len == 0) {
return ret;
}

while (true) {
int end = find(p_splitter, from);
Expand All @@ -1279,6 +1288,9 @@ Vector<int> String::split_ints_mk(const Vector<String> &p_splitters, bool p_allo
Vector<int> ret;
int from = 0;
int len = length();
if (len == 0) {
return ret;
}

while (true) {
int idx = 0;
Expand Down
Loading