From 9f69517be928bf78b7d63c2937941d6d9c93b48c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 4 Jun 2015 17:19:28 +0800 Subject: Fix issues with printout, lexing, and pattern resolving --- src/parse/lex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parse') 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) -- cgit v1.2.3