[minor] [fix] cint

This commit is contained in:
Anand Doshi 2013-11-06 18:13:23 +05:30
parent fc2160805b
commit 54aec0b623

View file

@ -32,7 +32,7 @@ function cint(v, def) {
if(v===false)
return 0;
v=v+'';
v=lstrip(v, ['0']);
if(v!=="0")v=lstrip(v, ['0']);
v=parseInt(v);
if(isNaN(v))v=def===undefined?0:def;
return v;