opencog/link-grammar — pull request #28 by ampli (2014-12-13 19:51:09+00:00)
Title: Fix wall print condition in case of no wall(s).

After the last change in In the linkage print functions,
in case one of both of the walls is not defined in the dict, the linkage print malfunctions.
This is because print_word_0/print_word_N are then set to false.
If the left wall is not defined, it then segfaults on referring to a negative index.

To fix that, I changed the print_word_0/N conditions to set print_word_0/print_word_N to true
in the case of no wall links. This happens if there are no walls.
If there are wall with no links (e.g. a sentence which consists of a sole dot), the walls are printed
(not as in old versions) but I think there is no harm in that.

Repeat by:
$ link-parser he
linkparser > x
(SEGV in link-grammar/print.c:437)