From 2c275bb955473de03c0e5400cb342847098eda4d Mon Sep 17 00:00:00 2001 From: MaeJong Date: Tue, 18 Apr 2017 01:32:01 +0200 Subject: Fix off-by-1 error in rshow --- src/game/g_admin.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/game/g_admin.c b/src/game/g_admin.c index fed3c63..14b2cc1 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -9548,11 +9548,11 @@ qboolean G_admin_rlist( gentity_t *ent, int skiparg ) else Com_sprintf( matchmethod, sizeof(matchmethod), "ip range size" ); - ADMBP( va( "^3!rlist:^7 found %d matching reports by %s.", + ADMBP( va( "^3!rlist:^7 found %d matching reports by %s. ", show_count, matchmethod ) ); } else { - ADMBP( va( "^3!rlist:^7 showing reports %d - %d of %d.", + ADMBP( va( "^3!rlist:^7 showing reports %d - %d of %d. ", ( found ) ? ( start + 1 ) : 0, ( ( start + MAX_ADMIN_SHOWREPORTS ) > found ) ? found : ( start + MAX_ADMIN_SHOWREPORTS ), @@ -9566,7 +9566,7 @@ qboolean G_admin_rlist( gentity_t *ent, int skiparg ) (filter[0]) ? filter : "" ) ); } - ADMBP( "^3rlist:^7 run ^3!rshow^7 to see all details about a report" ); + ADMBP( "Run ^3!rshow^7 to see full report\n" ); ADMBP( "\n" ); ADMBP_end(); @@ -10017,13 +10017,13 @@ qboolean G_admin_rarclist( gentity_t *ent, int skiparg ) Com_sprintf( matchmethod, sizeof(matchmethod), "ip range size" ); - ADMBP( va( "^3!rarclist:^7 found %d matching archived reports by %s. ", + ADMBP( va( "^3!rarclist:^7 found %d matching archived reports by %s. ", show_count, matchmethod ) ); } else { - ADMBP( va( "^3!rarclist:^7 showing archived reports %d - %d of %d. ", + ADMBP( va( "^3!rarclist:^7 showing archived reports %d - %d of %d. ", ( found ) ? ( start + 1 ) : 0, ( ( start + MAX_ADMIN_SHOWREPORTS ) > found ) ? found : ( start + MAX_ADMIN_SHOWREPORTS ), @@ -10037,7 +10037,7 @@ qboolean G_admin_rarclist( gentity_t *ent, int skiparg ) (filter[0]) ? filter : "" ) ); } - ADMBP( "^3rlist:^7 run ^3!rshow^7 ^5!^7 to see all details about an archive" ); + ADMBP( "Run ^3!rshow^7 ^5!^7 to see full archive\n" ); ADMBP( "\n" ); ADMBP_end(); @@ -10190,8 +10190,8 @@ qboolean G_admin_rshow( gentity_t *ent, int skiparg ) ID = atoi( arg2 ); G_SayArgv( 2 + skiparg, tmp, sizeof( tmp ) ); - archive = g_admin_archives[ ID ]; - report = g_admin_reports[ ID ]; + archive = g_admin_archives[ ID - 1 ]; + report = g_admin_reports[ ID - 1 ]; if( !strcmp( tmp, "!" ) ) { -- cgit