mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-02-22 20:11:25 +00:00
Fixed a potential buffer overflow.
This commit is contained in:
parent
cbc513b637
commit
128be4b0b8
3 changed files with 8 additions and 8 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
// because games can change separately from the main system version, we need a
|
// because games can change separately from the main system version, we need a
|
||||||
// second version that must match between game and cgame
|
// second version that must match between game and cgame
|
||||||
#define RPGX_VERSION "RPG-X V 2.4.0ua"
|
#define RPGX_VERSION "RPG-X V 2.4.1ua"
|
||||||
#define RPGX_COMPILEDATE __DATE__ " " __TIME__
|
#define RPGX_COMPILEDATE __DATE__ " " __TIME__
|
||||||
#define RPGX_COMPILEDBY "Jenkins Buildserver"
|
#define RPGX_COMPILEDBY "Jenkins Buildserver"
|
||||||
#define GAME_VERSION "RPG-X v" RPGX_VERSION
|
#define GAME_VERSION "RPG-X v" RPGX_VERSION
|
||||||
|
|
|
@ -1408,13 +1408,13 @@ static void G_SayTo(gentity_t* ent, gentity_t* other, int32_t mode, int32_t colo
|
||||||
if (mode == SAY_CLASS && !OnSameClass(ent, other) && (G_Client_IsAdmin(other) == qfalse)) {
|
if (mode == SAY_CLASS && !OnSameClass(ent, other) && (G_Client_IsAdmin(other) == qfalse)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == SAY_ADMIN && (G_Client_IsAdmin(other) == qfalse)) {
|
if (mode == SAY_ADMIN && (G_Client_IsAdmin(other) == qfalse)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no chatting to players in tournements
|
// no chatting to players in tournements
|
||||||
if (g_gametype.integer == GT_TOURNAMENT
|
if (g_gametype.integer == GT_TOURNAMENT && other->client->sess.sessionTeam == TEAM_FREE && sess->sessionTeam != TEAM_FREE) {
|
||||||
&& other->client->sess.sessionTeam == TEAM_FREE
|
|
||||||
&& sess->sessionTeam != TEAM_FREE) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1437,8 +1437,8 @@ static void G_Say(gentity_t* ent, gentity_t* target, int32_t mode, const char* c
|
||||||
int32_t j = 0;
|
int32_t j = 0;
|
||||||
gentity_t* other = NULL;
|
gentity_t* other = NULL;
|
||||||
int32_t color = 0;
|
int32_t color = 0;
|
||||||
char name[80];
|
char name[136];
|
||||||
char text[150];
|
char text[878];
|
||||||
char location[64];
|
char location[64];
|
||||||
char* className = NULL;
|
char* className = NULL;
|
||||||
gclient_t* entClient = NULL;
|
gclient_t* entClient = NULL;
|
||||||
|
@ -1526,7 +1526,7 @@ static void G_Say(gentity_t* ent, gentity_t* target, int32_t mode, const char* c
|
||||||
break;
|
break;
|
||||||
case SAY_ADMIN:
|
case SAY_ADMIN:
|
||||||
if (G_Client_GetLocationMsg(ent, location, sizeof(location)) && tarPers)
|
if (G_Client_GetLocationMsg(ent, location, sizeof(location)) && tarPers)
|
||||||
Com_sprintf(name, sizeof(name), "[%s%c%c] [%s] (%s): ", entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE, tarPers->netname, location);
|
Com_sprintf(name, sizeof(name), "[%s%c%c] [%s] (%s): ", entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE, tarPers->netname, location); // todo: this is bad
|
||||||
else if (tarPers)
|
else if (tarPers)
|
||||||
Com_sprintf(name, sizeof(name), "[%s%c%c ^7To %s^7]: ", entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE, tarPers->netname);
|
Com_sprintf(name, sizeof(name), "[%s%c%c ^7To %s^7]: ", entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE, tarPers->netname);
|
||||||
else return;
|
else return;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef STV_VERSION_H_
|
#ifndef STV_VERSION_H_
|
||||||
#define STV_VERSION_H_
|
#define STV_VERSION_H_
|
||||||
|
|
||||||
#define Q3_VERSION "RPG-X V 2.4.0ua"
|
#define Q3_VERSION "RPG-X V 2.4.1ua"
|
||||||
|
|
||||||
#endif /* STV_VERSION_H_ */
|
#endif /* STV_VERSION_H_ */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue