3 Jun
2009
3 Jun
'09
9:37 a.m.
Piotr Caban <piotr.caban(a)gmail.com> writes:
@@ -382,13 +383,23 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li }
d = int_part; - while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) - d = d*10 + *(ctx->ptr++) - '0'; + while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { + hlp = d*10 + *(ctx->ptr++) - '0'; + if(d > LLONG_MAX/10 || hlp<0) + exp++; + else + d = hlp; + }
LLONG_MAX is not portable, you'll have to provide your own definition. -- Alexandre Julliard julliard(a)winehq.org