tests/command_test.c : Fix false failure.

This commit is contained in:
Erik de Castro Lopo 2008-10-10 06:50:10 +11:00
parent ca75132a34
commit 5b754eba25
2 changed files with 2 additions and 1 deletions

View File

@ -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 <erikd AT mega-nerd DOT com>

View File

@ -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) ;
} ;