diff --git a/ChangeLog b/ChangeLog index 8e78f59b..5428ba14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * tests/command_test.c Improve error reporting when '\0' is found in coding history. + Fix false failure. 2008-10-09 Erik de Castro Lopo diff --git a/tests/command_test.c b/tests/command_test.c index 00f46648..d74e3194 100644 --- a/tests/command_test.c +++ b/tests/command_test.c @@ -987,7 +987,7 @@ check_coding_history_newlines (const char *filename) exit (1) ; } ; - if (bc_read.coding_history [k] == 0) + if (bc_read.coding_history [k] == 0 && k < bc_read.coding_history_size - 1) { printf ("\n\nLine %d : '\\0' within coding history at index %d of %d.\n\n", __LINE__, k, bc_read.coding_history_size) ; exit (1) ; } ;