diff options
author | hydai <z54981220@gmail.com> | 2018-09-19 01:09:16 +0800 |
---|---|---|
committer | hydai <z54981220@gmail.com> | 2018-09-19 22:01:15 +0800 |
commit | b409faa675be96dda961b14eca9adde62be63263 (patch) | |
tree | 2c1bbc2c6af98066e71356cb0d09d8978cff67ba /libsolidity | |
parent | 5f919d02abc21e17d533a18876eabdf1a91939f7 (diff) | |
download | dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar.gz dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar.bz2 dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar.lz dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar.xz dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.tar.zst dexon-solidity-b409faa675be96dda961b14eca9adde62be63263.zip |
Disallow uppercase X in hex number literals
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/parsing/Scanner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/parsing/Scanner.cpp b/libsolidity/parsing/Scanner.cpp index c9d5b969..0f6d6996 100644 --- a/libsolidity/parsing/Scanner.cpp +++ b/libsolidity/parsing/Scanner.cpp @@ -780,13 +780,13 @@ Token::Value Scanner::scanNumber(char _charSeen) { addLiteralCharAndAdvance(); // either 0, 0exxx, 0Exxx, 0.xxx or a hex number - if (m_char == 'x' || m_char == 'X') + if (m_char == 'x') { // hex number kind = HEX; addLiteralCharAndAdvance(); if (!isHexDigit(m_char)) - return Token::Illegal; // we must have at least one hex digit after 'x'/'X' + return Token::Illegal; // we must have at least one hex digit after 'x' while (isHexDigit(m_char) || m_char == '_') // We keep the underscores for later validation addLiteralCharAndAdvance(); |