summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 4fdcaacf..c3428c22 100644
--- a/lib.c
+++ b/lib.c
@@ -4631,7 +4631,9 @@ val sub_str(val str_in, val from, val to)
if (ge(from, to)) {
return null_string;
- } else if (from == zero && eql(to, len)) {
+ } else if (from == zero && eql(to, len) &&
+ (opt_compat == 0 || opt_compat > 215))
+ {
return str_in;
} else {
size_t nchar = c_num(to, self) - c_num(from, self) + 1;