mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fixing ecma_uint32_to_string helper.
This commit is contained in:
parent
9acbaafc8e
commit
3dc9a5838a
@ -344,7 +344,7 @@ ecma_uint32_to_string (uint32_t value, /**< value to convert */
|
||||
|
||||
do
|
||||
{
|
||||
JERRY_ASSERT (p != out_buffer_p);
|
||||
JERRY_ASSERT (p >= out_buffer_p);
|
||||
|
||||
*p-- = digits[value % 10];
|
||||
value /= 10;
|
||||
@ -353,6 +353,10 @@ ecma_uint32_to_string (uint32_t value, /**< value to convert */
|
||||
}
|
||||
while (value != 0);
|
||||
|
||||
p++;
|
||||
|
||||
JERRY_ASSERT (p >= out_buffer_p);
|
||||
|
||||
if (likely (p != out_buffer_p))
|
||||
{
|
||||
ssize_t bytes_to_move = ((uint8_t*) out_buffer_p + buffer_size) - (uint8_t*) p;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user