summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2016-11-11 16:52:16 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2016-11-11 16:55:09 (GMT)
commitb92047ed10c4da784c296dfcf09da250b7b637c7 (patch) (side-by-side diff)
tree9329fa2f35857af5cc546ae399e8b0e4c6c91d8f
parent1b89c5a728a99acffff75582f5a4126f5b4d2d4b (diff)
downloadcflow-b92047ed10c4da784c296dfcf09da250b7b637c7.tar.gz
cflow-b92047ed10c4da784c296dfcf09da250b7b637c7.tar.bz2
Bugfix
* src/parser.c (tokdel): Fix amount of memory to move. * THANKS: Niklas Angebrand
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.