aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-03-08 19:24:22 +0800
committerGitHub <noreply@github.com>2017-03-08 19:24:22 +0800
commit78f7dd23446fb0bd4bff1847d560df4fac0e1159 (patch)
tree03ba2994c1723ae1d8b88d033230c4ae0a1e3ec7 /libsolidity
parent85411f4f677769f3ea1b69c49c44d9c08180dbd4 (diff)
parentd3ab59dff679300ef220e551a28eba20172946d7 (diff)
downloaddexon-solidity-78f7dd23446fb0bd4bff1847d560df4fac0e1159.tar.gz
dexon-solidity-78f7dd23446fb0bd4bff1847d560df4fac0e1159.tar.zst
dexon-solidity-78f7dd23446fb0bd4bff1847d560df4fac0e1159.zip
Merge pull request #1750 from ethereum/asmoctal
Disallow octal numbers in parser.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/parsing/Scanner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/parsing/Scanner.cpp b/libsolidity/parsing/Scanner.cpp
index 3623f23f..0e60fd0b 100644
--- a/libsolidity/parsing/Scanner.cpp
+++ b/libsolidity/parsing/Scanner.cpp
@@ -758,6 +758,9 @@ Token::Value Scanner::scanNumber(char _charSeen)
while (isHexDigit(m_char))
addLiteralCharAndAdvance();
}
+ else if (isDecimalDigit(m_char))
+ // We do not allow octal numbers
+ return Token::Illegal;
}
// Parse decimal digits and allow trailing fractional part.
if (kind == DECIMAL)