ANU News Patch Patch ID: 940607_newsutility.c!bailey@genetics.upenn.edu Date: 07-Jun-1994 Author: Charles Bailey bailey@genetics.upenn.edu News Version: 6.1beta9 News Files: NewsUtility.C Description: Fixes bug in map_items() which caused grp_topnum to be set incorrectly when operating as a local reader. This bug was particularly likely to be apparent in groups containing only one item. Also adds code to update grp_topnum when operating as a NNTP client. *** newsutility.c --- newsutility_new.c ************** *** 101,103 **-- **/ --- 101,106 ----- + ** V6.1b9 7-Jun-1994 Charles Bailey bailey@genetics.upenn.edu + ** - fix bug in map_items() which caused grp_topnum to be set incorrectly + ** under some circumstances (particularly when group has only one item) **-- **/ ************** *** 2671,2676 } } if (gap->grp_unread > gap->grp_count) gap->grp_unread = gap->grp_count; } } else { --- 2674,2682 ----- } } if (gap->grp_unread > gap->grp_count) gap->grp_unread = gap->grp_count; + if (gap->grp_count) + gap->grp_topnum = gap->grp_ia[gap->grp_count].itm_num; + else gap->grp_topnum = last; } } else { ************** *** 2701,2708 while (sys_get_nornf(&itmrab)) { if (newsitm.itm_grp != key[1]) { if (gap->grp_count) { ! if (gap->grp_ia[gap->grp_count-1].itm_num > gap->grp_topnum) ! gap->grp_topnum = gap->grp_ia[gap->grp_count-1].itm_num; } break; } --- 2707,2714 ----- while (sys_get_nornf(&itmrab)) { if (newsitm.itm_grp != key[1]) { if (gap->grp_count) { ! if (gap->grp_ia[gap->grp_count].itm_num > gap->grp_topnum) ! gap->grp_topnum = gap->grp_ia[gap->grp_count].itm_num; } break; } *** patchlist.h;-1 --- patchlist.h ************** *** 1,1 =+=+= End =+=+= --- 1,2 ----- + 940607_newsutility.c!bailey@genetics.upenn.edu =+=+= End =+=+=