Permalink
Browse files

Fix incorrect behavior if a string that begins with %s is passed to p…

…rintf
  • Loading branch information...
1 parent c562dc4 commit fb7798ffd429e4b28be74adc75a7812f6c180334 @eikes eikes committed Feb 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.i18n.js
View
2 jquery.i18n.js
@@ -118,7 +118,7 @@ $.i18n = {
var tS = S.split("%s");
for(var i=0; i<L.length; i++) {
- if (tS[i].lastIndexOf('%') == tS[i].length-1 && i != L.length-1)
+ if (tS[i].length != 0 && tS[i].lastIndexOf('%') == tS[i].length-1 && i != L.length-1)
tS[i] += "s"+tS.splice(i+1,1)[0];
nS += tS[i] + L[i];
}

0 comments on commit fb7798f

Please sign in to comment.