From 0dcacdcf061b36cfe4c6255c532f87d41fdcc362 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 19 Dec 2022 17:18:18 +0100 Subject: [PATCH] Tuples are only made of lowercase single letters. --- aocla.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aocla.c b/aocla.c index 02d2099..86b0dc9 100644 --- a/aocla.c +++ b/aocla.c @@ -176,12 +176,13 @@ obj *parseList(aoclactx *ctx, const char *s, const char **next) { return NULL; } else if (o->type == OBJ_TYPE_TUPLE && (element->type != OBJ_TYPE_SYMBOL || - element->sym.len != 1)) + element->sym.len != 1 || + !islower(element->sym.ptr[0]))) { /* Tuples can be only composed of one character symbols. */ release(element); release(o); - setError(ctx,s,"Non symbol object in tuple"); + setError(ctx,s,"Non lower case letter in tuple"); return NULL; } o->l.ele = myrealloc(o->l.ele, sizeof(obj*)*(o->l.len+1));