Use ecma_number_t instead of double where possible (#2330)

Some code paths explicitly used double instead of ecma_number_t
even though the values assigned from or compared to were of type
ecma_value_t.

Related to #2251

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2018-05-16 02:17:34 +02:00
committed by yichoi
parent 38f0dbf065
commit 19451fa2d1
3 changed files with 3 additions and 3 deletions
@@ -138,7 +138,7 @@ ecma_op_create_arraybuffer_object (const ecma_value_t *arguments_list_p, /**< li
const uint32_t maximum_size_in_byte = UINT32_MAX - sizeof (ecma_extended_object_t) - JMEM_ALIGNMENT + 1;
if (length_num <= -1.0 || length_num > (double) maximum_size_in_byte + 0.5)
if (length_num <= -1.0 || length_num > (ecma_number_t) maximum_size_in_byte + 0.5)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid ArrayBuffer length."));
}