Skip to content
Snippets Groups Projects
Commit 775f79bf authored by rswindell's avatar rswindell
Browse files

Fix import bug introduced in rev 1.31: using total_msgs (to calculate

where to set the initial import_ptr) before total_msgs was defined.
JavaScript is too forgiving! :-)
Thanks to Kirkman for the bug report.
parent 18f04019
No related branches found
No related tags found
No related merge requests found
......@@ -366,14 +366,15 @@ function import_from_msgbase(list, msgbase, import_ptr, limit, all)
}
}
highest=import_ptr;
log(LOG_DEBUG, "import_ptr = " + import_ptr + " last_msg = " + msgbase.last_msg);
var total_msgs = msgbase.total_msgs;
log(LOG_DEBUG, "import_ptr = " + import_ptr + ", last_msg = " + msgbase.last_msg + ", total_msgs = " + total_msgs);
if(msgbase.last_msg >= import_ptr)
i = total_msgs - (msgbase.last_msg - import_ptr);
var total_msgs = msgbase.total_msgs;
for(; i<total_msgs; i++) {
if(js.terminated)
break;
//print(i);
if(debug)
print(i);
var idx = msgbase.get_msg_index(/* by_offset: */true, i);
if(!idx) {
// print("Error " + msgbase.error + " reading index of msg offset " + i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment