mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fix: substr("foo",begin:3) now returns "" instead of true
This commit is contained in:
@@ -336,7 +336,7 @@ SCRIPT_FUNCTION(substring) {
|
||||
if (begin < 0) begin = 0;
|
||||
if (end < 0) end = 0;
|
||||
if (begin >= end || (size_t)begin >= input.size()) {
|
||||
SCRIPT_RETURN(wxEmptyString);
|
||||
SCRIPT_RETURN(String());
|
||||
} else if ((size_t)end >= input.size()) {
|
||||
SCRIPT_RETURN(input.substr(begin));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user