js: Print negative zero with minus sign

This commit is contained in:
Linus Groh 2020-10-12 18:03:07 +02:00 committed by Andreas Kling
parent 65cdac1a5b
commit fb13ea2259
Notes: sideshowbarker 2024-07-19 01:55:34 +09:00

View file

@ -280,6 +280,8 @@ static void print_value(JS::Value value, HashTable<JS::Object*>& seen_objects)
printf("\033[34;1m");
if (value.is_string())
putchar('"');
else if (value.is_negative_zero())
putchar('-');
printf("%s", value.to_string_without_side_effects().characters());
if (value.is_string())
putchar('"');