text: fix length check

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2026-02-17 21:39:09 +02:00
committed by Elias Naur
parent 3d6cafa94d
commit 9ab8095d1a
+1 -1
View File
@@ -224,7 +224,7 @@ func (p *parser) parse(rule string) ([]string, error) {
//
// LIST ::= <FACE> <COMMA> <LIST> | <FACE>
func (p *parser) parseList() error {
if len(p.tokens) < 0 {
if len(p.tokens) == 0 {
return fmt.Errorf("expected family name, got EOF")
}
if head := p.tokens[0]; head.kind != tokenStr {