rem: var rv=parseInt(Math.round(Math.random() * arr.length)); 
add: var rv=parseInt(Math.round(Math.random() * (arr.length-1))); 
context: function tzRandTaglineFromFile(aUrl) {  if(!aUrl || aUrl=="") {    alert(getText("noAuto"));    return null;  }  try {    include('chrome://jslib/content/io/file.js');    //include('chrome://jslib/content/io/fileUtils.js');  }  catch(ex) {    alert(getText("noJSlib"));    return null;  }  var aFile=aUrl;  if(aUrl.substring(0,7)=="file://") {    var fUtils = new FileUtils();    aFile = fUtils.urlToPath(aUrl);  }  var f = new File(aFile);    try {    f.open("r");    var arr = f.read();    f.close();    arr = arr.replace(/\r\n/g, "\n");        var delim="\n"+readMyPref("tagzilla.multiline.delimiter","string","%")+"\n";    if(delim!="\n\n" && arr.indexOf(delim)>=0) {      arr = arr.split(delim);    }    else {      arr = arr.split("\n");      if(arr[arr.length-1]=="")        arr.pop();    }    var rv=parseInt(Math.round(Math.random() * arr.length));    var tag=arr[rv];    if(readMyPref("tagzilla.newline.convert","bool",true)) {      tag = tag.replace(/\\n/g,"\n");    }    return tag;  }  catch(ex) {    alert(getText("cantRead"));    return null;  }}
meta: 1647	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1647/90e0183b7a973e2333501d1e0cd3b6a19b5ff825/tagzillaAuto.js/buggy/src/tagzilla/content/tagzillaAuto.js