Skip to content
Snippets Groups Projects
Commit 9510160b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_lightbar_menu_substrWithAttrCodes_len_0' into 'master'

dd_lightbar_menu.js: Fix for substrWithAttrCodes(): If the given length is 0, then just return an empty string

See merge request !348
parents 32b50ba8 2ee17082
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!348dd_lightbar_menu.js: Fix for substrWithAttrCodes(): If the given length is 0, then just return an empty string
......@@ -3560,6 +3560,8 @@ function substrWithAttrCodes(pStr, pStartIdx, pLen)
if (typeof(pStartIdx) !== "number")
return "";
var len = typeof(pLen) === "number" ? pLen : console.strlen(pStr)-pStartIdx;
if (len <= 0)
return "";
if ((pStartIdx <= 0) && (pLen >= console.strlen(pStr)))
return pStr;
var startIdx = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment