home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol241 / turbobbs.lbr / MSYS.FIX < prev    next >
Encoding:
Text File  |  1986-02-10  |  1.4 KB  |  35 lines

  1.         The procedure "messagesearch" in the include file MAILSYS.INC in version
  2.     1.05 of the Vancouver TurboBBS source contains a minor bug that causes the
  3.     program to crash under certain circumstances. Delete the existing
  4.     messagesearch and use ^KR to read in this replacement. (The program crash
  5.     does not harm data, just causes system to drop program execution...)
  6.  
  7. procedure messagesearch(first:byte; fromnum, tonum:integer; sectnum:byte);
  8.   var
  9.     loop: byte;
  10.     inch: char;
  11.     oldnum: integer;
  12.     matched: boolean;
  13.   begin
  14.     matched := false;
  15.     inch := null;
  16.     loop := first;
  17.     if loop = 0 then loop := 1;
  18.     while cts and (loop <= count) and (inch <> 'Q') and (count <> 0) do begin
  19.       oldnum := messtable[loop].number;
  20.       if ((fromnum = 0) or (fromnum = messtable[loop].sender))
  21.         and ((tonum = 0) or (tonum = messtable[loop].recver))
  22.         and ((sectnum = 0) or (sectnum = messtable[loop].section))
  23.         and not (secure(loop) and messtable[loop].private)
  24.       then begin
  25.         matched := true;
  26.         cancelled := false;
  27.         header(loop);
  28.         inch := getcap('Read (Y/N/Quit)? ');
  29.         if inch = 'Y' then readfile(loop);
  30.       end;
  31.       if messtable[loop].number = oldnum then loop := loop + 1;
  32.     end;
  33.     if cts and not matched then lineout('No messages found.');
  34.   end;
  35.