summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--THANKS1
-rw-r--r--src/parser.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/THANKS b/THANKS
index fc8b63b..5f2bda4 100644
--- a/THANKS
+++ b/THANKS
@@ -9,6 +9,7 @@ Jerry St.Clair <jds.2005@verizon.net>
Laurent Fournie <lfournie@rockwellcollins.com>
Louis Bertrand <louis@bertrandtech.ca>
Nelson H. F. Beebe <beebe@math.utah.edu>
+Niklas Angebrand <niklas.angebrand.2@consultant.volvo.com>
Robert E. Michael <rmichael2@nc.rr.com>
Shigio YAMAGUCHI <shigio@tamacom.com>
Terje Røsten <terje.rosten@ntnu.no>
diff --git a/src/parser.c b/src/parser.c
index d2832a1..e5114dc 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -236,7 +236,7 @@ tokdel(int beg, int end)
if (end >= beg) {
if (end < tos)
memmove(token_stack + beg, token_stack + end + 1,
- (end - beg + 1) * sizeof(token_stack[0]));
+ (tos - end - 1) * sizeof(token_stack[0]));
tos -= (end - beg + 1);
}
}

Return to:

Send suggestions and report system problems to the System administrator.