Fix for %% being broken in sprintf (minor bugfix for press message showing undefined, larger press bugs remain).

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I
2011-01-09 03:25:59 -08:00
parent 4db1e28677
commit c620c7bf39
+5 -3
View File
@@ -42,10 +42,12 @@ exports.sprintf = function(format)
}
index += t.length;
if (t.charAt(0) != "%")
{
if (t.charAt(0) !== "%")
result += t;
}
else if (t === "%%")
result += "%";
else
{
var subtokens = t.match(tagRegex);