From 581aace50167ef36240f0ce37c56bd90e70a6163 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 22 Jun 2017 00:40:55 +0100 Subject: LLL: do not allow empty variable names --- liblll/CodeFragment.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 1329ec9b..ff173e91 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -173,6 +173,8 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) auto varAddress = [&](string const& n) { + if (n.empty()) + error("Empty variable name not allowed"); auto it = _s.vars.find(n); if (it == _s.vars.end()) error(std::string("Symbol not found: ") + s); -- cgit v1.2.3