From 31769b7e957ea73af00de28fd36bd711f60e8b46 Mon Sep 17 00:00:00 2001 From: Meisam Bahadori Date: Sun, 26 Jul 2026 19:02:09 +0200 Subject: [PATCH] pa-8 --- src/spicelib/parser/inpgtok.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/spicelib/parser/inpgtok.c b/src/spicelib/parser/inpgtok.c index be17a1a3f..69b37071a 100644 --- a/src/spicelib/parser/inpgtok.c +++ b/src/spicelib/parser/inpgtok.c @@ -187,6 +187,16 @@ INPgetNetTok(char **line, char **token, int gobble) break; if (*point == ',') break; + /* '(' must terminate a token here, matching the leading-garbage + skip above (which already treats a leading '(' as a boundary) + and matching INPgetTok(). Without this, a token immediately + followed by '(' with no space -- e.g. an OSDI .model card's + `modname devtype(p1=v1 p2=v2)`, no space before '(' -- gets + misparsed as one token spanning into the parameter list, + swallowing the opening paren and the first parameter's name + together, silently dropping that parameter's value. */ + if (*point == '(') + break; if (*point == ')') break; }