From fed8aceae50e03dc3e6db3379d2739498752206f Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 25 May 2007 21:19:50 +0000 Subject: [PATCH] Use StringUtil.parseInteger. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4724 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/MessageBundle.as | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/as/com/threerings/util/MessageBundle.as b/src/as/com/threerings/util/MessageBundle.as index 1286721c4..2ad5b2676 100644 --- a/src/as/com/threerings/util/MessageBundle.as +++ b/src/as/com/threerings/util/MessageBundle.as @@ -176,11 +176,8 @@ public class MessageBundle if (getResourceString(key + ".n", false) != null) { // try converting the first arg to an int try { - var n :Number = parseInt(args[0]); - if (!isNaN(n)) { - args[0] = n; - msg = getResourceString(key + getSuffix(args), false); - } + args[0] = StringUtil.parseInteger(args[0]); + msg = getResourceString(key + getSuffix(args), false); } catch (err :Error) { // fall through... }