From a5506cdbadd1ba8864c50a673d9d5bd34d56ecf3 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 8 Mar 2008 01:20:48 +0000 Subject: [PATCH] Avoid putting an empty String at the end of the array in parseURLs(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4966 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/StringUtil.as | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/as/com/threerings/util/StringUtil.as b/src/as/com/threerings/util/StringUtil.as index 6479a9176..fb2451599 100644 --- a/src/as/com/threerings/util/StringUtil.as +++ b/src/as/com/threerings/util/StringUtil.as @@ -313,8 +313,9 @@ public class StringUtil s = s.substring(index + url.length); } - // just the string is left - array.push(s); + if (s != "" || array.length == 0) { // avoid putting an empty string on the end + array.push(s); + } return array; }