diff --git a/src/as/com/threerings/util/StringUtil.as b/src/as/com/threerings/util/StringUtil.as index cf31f06de..19550ce68 100644 --- a/src/as/com/threerings/util/StringUtil.as +++ b/src/as/com/threerings/util/StringUtil.as @@ -518,6 +518,12 @@ public class StringUtil str = str.substring(1); } + // handle this special case immediately, to prevent confusion about + // a leading 0 meaning "parse as octal" + if (str == "0") { + return 0; + } + if (radix == 0) { if (startsWith(str, "0x")) { str = str.substring(2);