aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-09-16 18:37:54 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-09-16 18:37:54 +0800
commitc0d84156f202d25e4d7dbf3a2af103bbbc5a03fb (patch)
tree2cc41d2c7f2bdfd153f036d6a522f864d309ba6a
parentacd8e59039ee5ad076f5163270031053ac389ac4 (diff)
downloaddexon-mcl-c0d84156f202d25e4d7dbf3a2af103bbbc5a03fb.tar.gz
dexon-mcl-c0d84156f202d25e4d7dbf3a2af103bbbc5a03fb.tar.zst
dexon-mcl-c0d84156f202d25e4d7dbf3a2af103bbbc5a03fb.zip
fix detection of 0b...
-rw-r--r--include/mcl/vint.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp
index ded1a21..a3e0753 100644
--- a/include/mcl/vint.hpp
+++ b/include/mcl/vint.hpp
@@ -1248,7 +1248,7 @@ public:
if (base != 0 && base != 16) throw cybozu::Exception("Vint:setStr bad base 0x)") << str << base;
base = 16;
str = str.substr(2);
- } else if (str.size() >= 2 && str[0] == '0' && str[1] == 'x') {
+ } else if (str.size() >= 2 && str[0] == '0' && str[1] == 'b') {
if (base != 0 && base != 2) throw cybozu::Exception("Vint:setStr bad base 0b") << str << base;
base = 2;
str = str.substr(2);