summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 6b80b848..3445cd97 100644
--- a/lib.c
+++ b/lib.c
@@ -1644,8 +1644,7 @@ val sub_str(val str_in, val from, val to)
} else {
size_t nchar = c_num(to) - c_num(from) + 1;
wchar_t *sub = (wchar_t *) chk_malloc(nchar * sizeof (wchar_t));
- const wchar_t *str = c_str(lazy_stringp(str_in)
- ? str_in->ls.prefix : str_in);
+ const wchar_t *str = c_str(str_in);
wcsncpy(sub, str + c_num(from), nchar);
sub[nchar-1] = 0;
return string_own(sub);