summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pfunction.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-10-03 12:18:04 +0200
committer couriersud <couriersud@gmx.org>2020-10-03 14:41:15 +0200
commitb49a86981c1e2d635f738dbddf285d03d2bce183 (patch)
treeef7680b3d63b6b24eafd79ba637e2ed55fe4e689 /src/lib/netlist/plib/pfunction.cpp
parenta0e531e0e7c1e2d60b527be2c73e049db558e0a9 (diff)
netlist: catch parenthesis count mismatch in formulas.
Diffstat (limited to 'src/lib/netlist/plib/pfunction.cpp')
-rw-r--r--src/lib/netlist/plib/pfunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp
index 0cf4fc4cdc2..d592a90d670 100644
--- a/src/lib/netlist/plib/pfunction.cpp
+++ b/src/lib/netlist/plib/pfunction.cpp
@@ -150,6 +150,8 @@ namespace plib {
throw pexception(plib::pfmt("pfunction: stack underflow on token <{1}> in <{2}>")(cmd)(expr));
if (stk >= narrow_cast<int>(MAX_STACK))
throw pexception(plib::pfmt("pfunction: stack overflow on token <{1}> in <{2}>")(cmd)(expr));
+ if (rc.cmd() == LP || rc.cmd() == RP)
+ throw pexception(plib::pfmt("pfunction: parenthesis inequality on token <{1}> in <{2}>")(cmd)(expr));
m_precompiled.push_back(rc);
}
if (stk != 1)