From c7612ecb7d347bf5bbe0e29dc3d9057c418314a3 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 30 Dec 2008 20:25:51 +0000 Subject: [PATCH] Apply Jamie's fix for negative numbers here on the actionscript side, too. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5607 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/StringUtil.as | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/util/StringUtil.as b/src/as/com/threerings/util/StringUtil.as index 059bc0837..286d89a09 100644 --- a/src/as/com/threerings/util/StringUtil.as +++ b/src/as/com/threerings/util/StringUtil.as @@ -154,7 +154,8 @@ public class StringUtil } // hackily add commas - while (s.length > 3) { + var prefixLength :int = (n < 0) ? 1 : 0; + while (s.length - prefixLength > 3) { postfix = "," + s.substring(s.length - 3) + postfix; s = s.substring(0, s.length - 3); }