summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs/smbcalls_string.c')
-rw-r--r--source4/scripting/ejs/smbcalls_string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c
index 403de7ba35..ab5aecd847 100644
--- a/source4/scripting/ejs/smbcalls_string.c
+++ b/source4/scripting/ejs/smbcalls_string.c
@@ -185,7 +185,7 @@ static int ejs_substr(MprVarHandle eid, int argc, struct MprVar **argv)
length = strlen(orig);
if (start_offset < 0) start_offset += strlen(orig);
if (start_offset < 0 || start_offset > strlen(orig)) {
- ejsSetErrorMsg(eid, "substr arg 2 out of bounds");
+ ejsSetErrorMsg(eid, "substr arg 2 out of bounds ([%s], %d)", orig, start_offset);
return -1;
}
@@ -193,7 +193,7 @@ static int ejs_substr(MprVarHandle eid, int argc, struct MprVar **argv)
length = mprToInt(argv[2]);
if (length < 0) length += strlen(orig) - start_offset;
if (length < 0 || length+start_offset > strlen(orig)) {
- ejsSetErrorMsg(eid, "substr arg 3 out of bounds");
+ ejsSetErrorMsg(eid, "substr arg 3 out of bounds ([%s], %d, %d)", orig, start_offset, length);
return -1;
}
}