summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index ad83e91a..46e445ca 100644
--- a/lib.c
+++ b/lib.c
@@ -3463,6 +3463,11 @@ val chr_str_set(val str, val ind, val chr)
{
cnum index = c_num(ind);
+ if (is_lit(str)) {
+ uw_throwf(error_s, lit("chr-str-set: cannot modify literal string ~s"),
+ str, nao);
+ }
+
if (index < 0) {
ind = plus(length_str(str), ind);
index = c_num(ind);