[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3.1.0 regression
From: |
Stepan Kasal |
Subject: |
Re: 3.1.0 regression |
Date: |
Thu, 5 Jun 2003 12:41:50 +0200 |
User-agent: |
Mutt/1.2.5.1i |
Hello James,
On Wed, Jun 04, 2003 at 05:53:56PM +0100, James Troup wrote:
> http://bugs.debian.org/188345
the bug works like this:
When you have commands:
a1
a2
...
{
b1
b2
...
}
c1
c2
...
then command c1 replaces the list b2,..., so that you get only this:
a1
a2
...
b1
c1
c2
...
The patch below applies to 3.1.2 as well as to 3.1.1 and fixes the bug.
Stepan
2003-06-05 Stepan Kasal <address@hidden>
* awkgram.y (append_right): when using savetail, remember that it
is not necessarily the tail of the list---it's just pointer to
the last chunk appended.
--- gawk-3.1.2/awkgram.y.orig Wed Mar 19 13:06:57 2003
+++ gawk-3.1.2/awkgram.y Thu Jun 5 12:26:07 2003
@@ -2609,10 +2609,9 @@ append_right(NODE *list, NODE *new)
return list;
oldlist = list;
- if (savefront == oldlist) {
- savetail = savetail->rnode = new;
- return oldlist;
- } else
+ if (savefront == oldlist)
+ list = savetail; /* Be careful: maybe list->rnode != NULL */
+ else
savefront = oldlist;
while (list->rnode != NULL)
list = list->rnode;