fix partial log output bug
This commit is contained in:
@@ -303,8 +303,12 @@ const char *RageLog::GetRecentLog( int n )
|
|||||||
{
|
{
|
||||||
if( n >= BACKLOG_LINES || n >= backlog_cnt )
|
if( n >= BACKLOG_LINES || n >= backlog_cnt )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if( backlog_cnt == BACKLOG_LINES )
|
||||||
|
{
|
||||||
n += backlog_start;
|
n += backlog_start;
|
||||||
n %= BACKLOG_LINES;
|
n %= BACKLOG_LINES;
|
||||||
|
}
|
||||||
/* Make sure it's terminated: */
|
/* Make sure it's terminated: */
|
||||||
backlog[n][ sizeof(backlog[n])-1 ] = 0;
|
backlog[n][ sizeof(backlog[n])-1 ] = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user