aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-11 05:22:42 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-10-11 06:00:22 +0800
commit7ae68e1e4776573b8ee60cadafb5ccc9455e00bf (patch)
tree021a3b422f1e60ad984cdee743c60272cc1b4b0f /libsolidity
parentd3f410d8a89aaa042ff264d7a0ea79184e01abab (diff)
downloaddexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar.gz
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar.bz2
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar.lz
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar.xz
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.tar.zst
dexon-solidity-7ae68e1e4776573b8ee60cadafb5ccc9455e00bf.zip
Fix pragma keyword check
Fixes #1192
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index a95b4879..dc8c1806 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -67,7 +67,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma)
{
solAssert(!_pragma.tokens().empty(), "");
solAssert(_pragma.tokens().size() == _pragma.literals().size(), "");
- if (_pragma.tokens()[0] != Token::Identifier && _pragma.literals()[0] != "solidity")
+ if (_pragma.tokens()[0] != Token::Identifier || _pragma.literals()[0] != "solidity")
syntaxError(_pragma.location(), "Unknown pragma \"" + _pragma.literals()[0] + "\"");
else
{