diff options
author | John Hodge <tpg@mutabah.net> | 2015-06-04 17:19:28 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-06-04 17:19:28 +0800 |
commit | 9f69517be928bf78b7d63c2937941d6d9c93b48c (patch) | |
tree | 91df9882aeb77a5c1e67f1f157ff81dbfd9180dd /src/parse | |
parent | f2c96d7c448934baec49c91b5cb2ac7c05562437 (diff) | |
download | mrust-9f69517be928bf78b7d63c2937941d6d9c93b48c.tar.gz |
Fix issues with printout, lexing, and pattern resolving
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/lex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index c246bbc0..419a04d5 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -536,7 +536,7 @@ double Lexer::parseFloat(uint64_t whole) const int MAX_LEN = 63; const int MAX_SIG = MAX_LEN - 1 - 4; char buf[MAX_LEN+1]; - int ofs = snprintf(buf, MAX_LEN+1, "%llu", (unsigned long long)whole); + int ofs = snprintf(buf, MAX_LEN+1, "%llu.", (unsigned long long)whole); char ch = this->getc_num(); #define PUTC(ch) do { if( ofs < MAX_SIG ) { buf[ofs] = ch; ofs ++; } else { throw ParseError::Generic("Oversized float"); } } while(0) |