Piotr Caban <piotr.ca...@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
julli...@winehq.org


Reply via email to