summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-19 11:23:12 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-19 11:23:12 +0800
commit6516fda5b3a623bf6fd54ef36f99a336fc7f268d (patch)
tree3db571ec694818c0abac4c83321c1c3e9f00068f /src/parse
parentb7b634f517967da41befff67d579c5a1afa8d016 (diff)
downloadmrust-6516fda5b3a623bf6fd54ef36f99a336fc7f268d.tar.gz
Fix little bugs in recent spate of fixes
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/lex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp
index 42e36574..6e274adc 100644
--- a/src/parse/lex.cpp
+++ b/src/parse/lex.cpp
@@ -1202,14 +1202,14 @@ bool Codepoint::isxdigit() const {
s += (char)(0x80 | ((cp.v >> 6) & 0x3F));
s += (char)(0x80 | ((cp.v >> 0) & 0x3F));
}
- else if( cp.v <= (0x07+1)<<(2*6) ) {
+ else if( cp.v <= (0x07+1)<<(3*6) ) {
s += (char)(0xF0 | ((cp.v >> 18) & 0x07));
s += (char)(0x80 | ((cp.v >> 12) & 0x3F));
s += (char)(0x80 | ((cp.v >> 6) & 0x3F));
s += (char)(0x80 | ((cp.v >> 0) & 0x3F));
}
else {
- throw ::std::runtime_error("BUGCHECK: Bad unicode codepoint encountered");
+ throw ::std::runtime_error( FMT("BUGCHECK: Bad unicode codepoint encountered - " << ::std::hex << cp.v) );
}
return s;
}