diff -ruN groff-1.20.1/src/roff/troff/mtsm.cpp groff-1.20.1-fixed/src/roff/troff/mtsm.cpp --- groff-1.20.1/src/roff/troff/mtsm.cpp 2009-01-09 15:25:52.000000000 +0100 +++ groff-1.20.1-fixed/src/roff/troff/mtsm.cpp 2009-11-22 11:41:14.000000000 +0100 @@ -390,8 +390,6 @@ #endif if (sp == 0) fatal("empty state machine stack"); - if (sp->state) - delete sp->state; sp->state = 0; stack *t = sp; sp = sp->next; diff -ruN groff-1.20.1/src/roff/troff/node.cpp groff-1.20.1-fixed/src/roff/troff/node.cpp --- groff-1.20.1/src/roff/troff/node.cpp 2009-01-09 15:25:52.000000000 +0100 +++ groff-1.20.1-fixed/src/roff/troff/node.cpp 2009-11-22 11:40:55.000000000 +0100 @@ -1811,6 +1811,14 @@ { } +inline node::~node() +{ + if (state != 0) + delete state; + if (push_state != 0) + delete push_state; +} + /* glyphs, ligatures, kerns, discretionary breaks */ class charinfo_node : public node { @@ -4643,7 +4651,7 @@ } else { hunits rem = x - w*i; - if (rem > H0) + if (rem > H0) { if (n->overlaps_horizontally()) { if (out->is_on()) n->tprint(out); @@ -4651,6 +4659,7 @@ } else out->right(rem); + } while (--i >= 0) if (out->is_on()) n->tprint(out); diff -ruN groff-1.20.1/src/roff/troff/node.h groff-1.20.1-fixed/src/roff/troff/node.h --- groff-1.20.1/src/roff/troff/node.h 2009-01-09 15:25:52.000000000 +0100 +++ groff-1.20.1-fixed/src/roff/troff/node.h 2009-11-22 11:40:55.000000000 +0100 @@ -132,10 +132,6 @@ state = 0; } -inline node::~node() -{ -} - // 0 means it doesn't, 1 means it does, 2 means it's transparent int node_list_ends_sentence(node *);