This commit is contained in:
brendan%mozilla.org 2004-07-17 02:44:37 +00:00
Родитель ac625391e0
Коммит e65c24c40b
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -323,7 +323,7 @@ num_toLocaleString(JSContext *cx, JSObject *obj, uintN argc,
/* Figure out how long resulting string will be. */
size = digits + (dec ? decimalLength + strlen(dec + 1) : 0);
tmpGroup = rt->numGrouping;
numGrouping = tmpGroup = rt->numGrouping;
remainder = digits;
if (*num == '-')
remainder--;
@ -335,7 +335,7 @@ num_toLocaleString(JSContext *cx, JSObject *obj, uintN argc,
remainder -= *tmpGroup;
tmpGroup++;
}
if (*tmpGroup == '\0' && *rt->numGrouping != '\0') {
if (*tmpGroup == '\0' && *numGrouping != '\0') {
nrepeat = (remainder - 1) / tmpGroup[-1];
size += thousandsLength * nrepeat;
remainder -= nrepeat * tmpGroup[-1];