Browse Source

* last was not handled correctly in TStringQueue

pierre 26 years ago
parent
commit
7526d8714f
1 changed files with 8 additions and 1 deletions
  1. 8 1
      compiler/cobjects.pas

+ 8 - 1
compiler/cobjects.pas

@@ -639,6 +639,7 @@ end;
 constructor TStringQueue.Init;
 constructor TStringQueue.Init;
 begin
 begin
   first:=nil;
   first:=nil;
+  last:=nil;
 end;
 end;
 
 
 
 
@@ -691,6 +692,8 @@ begin
    begin
    begin
      if p^.data^=s then
      if p^.data^=s then
       begin
       begin
+        if p=last then
+          last:=prev;
         if assigned(prev) then
         if assigned(prev) then
          prev^.next:=p^.next
          prev^.next:=p^.next
         else
         else
@@ -744,6 +747,7 @@ begin
      first:=first^.next;
      first:=first^.next;
      dispose(newnode);
      dispose(newnode);
    end;
    end;
+  last:=nil;
 end;
 end;
 
 
 
 
@@ -2319,7 +2323,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.46  1999-11-14 15:56:36  peter
+  Revision 1.47  1999-11-15 14:59:55  pierre
+   * last was not handled correctly in TStringQueue
+
+  Revision 1.46  1999/11/14 15:56:36  peter
     * fixed stringqueue.delete
     * fixed stringqueue.delete
 
 
   Revision 1.45  1999/11/12 11:03:49  peter
   Revision 1.45  1999/11/12 11:03:49  peter