summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index f54a71c4..ec17d81b 100644
--- a/lib.c
+++ b/lib.c
@@ -3660,11 +3660,13 @@ const wchar_t *c_str(val obj)
return litptr(obj);
case STR:
return obj->st.str;
- case SYM:
- return c_str(symbol_name(obj));
case LSTR:
lazy_str_force(obj);
return c_str(obj->ls.prefix);
+ case SYM:
+ if (opt_compat && opt_compat <= 231)
+ return c_str(symbol_name(obj));
+ /* fallthrough */
default:
type_mismatch(lit("~s is not a string"), obj, nao);
}