mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix the number of copied bytes in memmove (#1698)
Fixes #1634 JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
parent
20466a7637
commit
3ff9a7de8a
@ -398,7 +398,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this
|
||||
/* Place radix point to the required position. */
|
||||
if (point < buff_index)
|
||||
{
|
||||
memmove (buff + point + 1, buff + point, (size_t) buff_index);
|
||||
memmove (buff + point + 1, buff + point, (size_t) (buff_index - point));
|
||||
buff[point] = '.';
|
||||
buff_index++;
|
||||
}
|
||||
|
||||
@ -90,6 +90,8 @@ assert ((-0x100000000000061).toString(16) === "-100000000000060");
|
||||
|
||||
assert((123400).toString(new Number(16)) === "1e208");
|
||||
|
||||
assert(65535.9.toString(3) === "10022220020.220022002200220022002210211012200000110221");
|
||||
|
||||
var digit_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
|
||||
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user