Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-07-02 22:08:41 +08:00
commit 688fa00ac4
2 changed files with 4 additions and 3 deletions

View file

@ -1,9 +1,10 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**************************************************************** /****************************************************************
* *
* The author of this software is David M. Gay. * The original author of this software is David M. Gay.
* *
* Copyright (c) 1991, 2000, 2001 by Lucent Technologies. * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
* Copyright (c) 2024 by Moonchild Productions.
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice * purpose without fee is hereby granted, provided that this entire notice
@ -2958,7 +2959,7 @@ dtoa
} }
#endif #endif
dval(d) += dval(d); dval(d) += dval(d);
if (dval(d) > ds || (dval(d) == ds && L & 1)) { if (dval(d) >= ds) {
bump_up: bump_up:
while(*--s == '9') while(*--s == '9')
if (s == s0) { if (s == s0) {

View file

@ -848,7 +848,7 @@ num_toFixed_impl(JSContext* cx, const CallArgs& args)
if (!ToInteger(cx, args[0], &prec)) if (!ToInteger(cx, args[0], &prec))
return false; return false;
if (!ComputePrecisionInRange(cx, -20, MAX_PRECISION, prec, &precision)) if (!ComputePrecisionInRange(cx, 0, MAX_PRECISION, prec, &precision))
return false; return false;
} }