fix partial log output bug

This commit is contained in:
Glenn Maynard
2003-08-19 02:19:17 +00:00
parent f754f4259b
commit 400c99f8dc
+6 -2
View File
@@ -303,8 +303,12 @@ const char *RageLog::GetRecentLog( int n )
{
if( n >= BACKLOG_LINES || n >= backlog_cnt )
return false;
n += backlog_start;
n %= BACKLOG_LINES;
if( backlog_cnt == BACKLOG_LINES )
{
n += backlog_start;
n %= BACKLOG_LINES;
}
/* Make sure it's terminated: */
backlog[n][ sizeof(backlog[n])-1 ] = 0;