Fix invalid read found by valgrind.

This commit is contained in:
Jonathan Moore Liles 2008-05-05 23:25:05 -05:00
parent 614f716726
commit 2881479cc2
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ Loggable::escape ( const char *s )
{ {
static char r[512]; static char r[512];
for ( size_t i = 0; i < sizeof( r ); ++i, ++s ) for ( size_t i = 0; *s && i < sizeof( r ); ++i, ++s )
{ {
if ( '\n' == *s ) if ( '\n' == *s )
{ {