mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-13 07:57:23 +00:00
Increase favorite address buffer size in Team Arena UI
Now it can hold an IPv6 address.
This commit is contained in:
parent
80b0792980
commit
fe47952bf5
1 changed files with 8 additions and 8 deletions
|
@ -3447,13 +3447,13 @@ static void UI_RunMenuScript(char **args) {
|
||||||
} else if (Q_stricmp(name, "addFavorite") == 0) {
|
} else if (Q_stricmp(name, "addFavorite") == 0) {
|
||||||
if (ui_netSource.integer != UIAS_FAVORITES) {
|
if (ui_netSource.integer != UIAS_FAVORITES) {
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char addr[MAX_NAME_LENGTH];
|
char addr[MAX_ADDRESSLENGTH];
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
trap_LAN_GetServerInfo(UI_SourceForLAN(), uiInfo.serverStatus.displayServers[uiInfo.serverStatus.currentServer], buff, MAX_STRING_CHARS);
|
trap_LAN_GetServerInfo(UI_SourceForLAN(), uiInfo.serverStatus.displayServers[uiInfo.serverStatus.currentServer], buff, MAX_STRING_CHARS);
|
||||||
name[0] = addr[0] = '\0';
|
name[0] = addr[0] = '\0';
|
||||||
Q_strncpyz(name, Info_ValueForKey(buff, "hostname"), MAX_NAME_LENGTH);
|
Q_strncpyz(name, Info_ValueForKey(buff, "hostname"), sizeof ( name ) );
|
||||||
Q_strncpyz(addr, Info_ValueForKey(buff, "addr"), MAX_NAME_LENGTH);
|
Q_strncpyz(addr, Info_ValueForKey(buff, "addr"), sizeof ( addr ) );
|
||||||
if (strlen(name) > 0 && strlen(addr) > 0) {
|
if (strlen(name) > 0 && strlen(addr) > 0) {
|
||||||
res = trap_LAN_AddServer(AS_FAVORITES, name, addr);
|
res = trap_LAN_AddServer(AS_FAVORITES, name, addr);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
@ -3472,10 +3472,10 @@ static void UI_RunMenuScript(char **args) {
|
||||||
}
|
}
|
||||||
} else if (Q_stricmp(name, "deleteFavorite") == 0) {
|
} else if (Q_stricmp(name, "deleteFavorite") == 0) {
|
||||||
if (ui_netSource.integer == UIAS_FAVORITES) {
|
if (ui_netSource.integer == UIAS_FAVORITES) {
|
||||||
char addr[MAX_NAME_LENGTH];
|
char addr[MAX_ADDRESSLENGTH];
|
||||||
trap_LAN_GetServerInfo(AS_FAVORITES, uiInfo.serverStatus.displayServers[uiInfo.serverStatus.currentServer], buff, MAX_STRING_CHARS);
|
trap_LAN_GetServerInfo(AS_FAVORITES, uiInfo.serverStatus.displayServers[uiInfo.serverStatus.currentServer], buff, MAX_STRING_CHARS);
|
||||||
addr[0] = '\0';
|
addr[0] = '\0';
|
||||||
Q_strncpyz(addr, Info_ValueForKey(buff, "addr"), MAX_NAME_LENGTH);
|
Q_strncpyz(addr, Info_ValueForKey(buff, "addr"), sizeof ( addr ) );
|
||||||
if (strlen(addr) > 0) {
|
if (strlen(addr) > 0) {
|
||||||
trap_LAN_RemoveServer(AS_FAVORITES, addr);
|
trap_LAN_RemoveServer(AS_FAVORITES, addr);
|
||||||
}
|
}
|
||||||
|
@ -3483,12 +3483,12 @@ static void UI_RunMenuScript(char **args) {
|
||||||
} else if (Q_stricmp(name, "createFavorite") == 0) {
|
} else if (Q_stricmp(name, "createFavorite") == 0) {
|
||||||
if (ui_netSource.integer == UIAS_FAVORITES) {
|
if (ui_netSource.integer == UIAS_FAVORITES) {
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char addr[MAX_NAME_LENGTH];
|
char addr[MAX_ADDRESSLENGTH];
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
name[0] = addr[0] = '\0';
|
name[0] = addr[0] = '\0';
|
||||||
Q_strncpyz(name, UI_Cvar_VariableString("ui_favoriteName"), MAX_NAME_LENGTH);
|
Q_strncpyz(name, UI_Cvar_VariableString("ui_favoriteName"), sizeof ( name ) );
|
||||||
Q_strncpyz(addr, UI_Cvar_VariableString("ui_favoriteAddress"), MAX_NAME_LENGTH);
|
Q_strncpyz(addr, UI_Cvar_VariableString("ui_favoriteAddress"), sizeof ( addr ) );
|
||||||
if (strlen(name) > 0 && strlen(addr) > 0) {
|
if (strlen(name) > 0 && strlen(addr) > 0) {
|
||||||
res = trap_LAN_AddServer(AS_FAVORITES, name, addr);
|
res = trap_LAN_AddServer(AS_FAVORITES, name, addr);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
|
Loading…
Reference in a new issue