From d44ca5baac54e36a08cfb1b122e5d0c6c0b194b7 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 29 Aug 2016 22:19:59 -0700 Subject: [PATCH] tokenizer: add missing return statement on float overflow closes #177 --- src/tokenizer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index bec95ae10f..b5fd00bc2a 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -320,6 +320,7 @@ static void end_float_token(Tokenize *t) { t->exponent_in_bin_or_dec += significand_magnitude_in_bin; if (!(-1023 <= t->exponent_in_bin_or_dec && t->exponent_in_bin_or_dec < 1023)) { t->cur_tok->data.num_lit.overflow = true; + return; } else { // this should chop off exactly one 1 bit from the top. significand_bits = ((uint64_t)significand << (52 - significand_magnitude_in_bin)) & 0xfffffffffffffULL;