mu-sexp: tighten definition of plistp

In a plist, we also require the first of each two element pairs to start
with ':'

Fixes #2830.
This commit is contained in:
Dirk-Jan C. Binnema
2025-03-23 17:09:03 +02:00
parent c91e4ef515
commit 4cda859eb8

View File

@ -326,7 +326,9 @@ Sexp::plistp(Sexp::const_iterator b, Sexp::const_iterator e) const
else if (b + 1 == e)
return false;
else
return b->symbolp() && plistp(b + 2, e);
return b->symbolp() &&
b->symbol().name.starts_with(':')
&& plistp(b + 2, e);
}