Skip to content

Commit

Permalink
Merged pull request "Sync with Q2PRO: Safer code": #380
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Feb 21, 2024
2 parents c40054b + 4ec20c8 commit c2b7d44
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 72 deletions.
2 changes: 1 addition & 1 deletion src/client/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ static void CL_ConnectionlessPacket(void)
CL_ClientCommand("new");
cls.state = ca_connected;
cls.connect_count = 0;
strcpy(cl.mapname, mapname); // for levelshot screen
Q_strlcpy(cl.mapname, mapname, sizeof(cl.mapname)); // for levelshot screen
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/precache.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void CL_RegisterVWepModels(void)
}

// special player weapon model
strcpy(cl.weaponModels[cl.numWeaponModels++], name + 1);
Q_strlcpy(cl.weaponModels[cl.numWeaponModels++], name + 1, sizeof(cl.weaponModels[0]));

if (cl.numWeaponModels == MAX_CLIENTWEAPONMODELS) {
break;
Expand Down
4 changes: 2 additions & 2 deletions src/client/sound/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static sfxcache_t *DMA_UploadSfx(sfx_t *sfx)
}

int size = outcount * s_info.width * s_info.channels;
sfxcache_t *sc = sfx->cache = S_Malloc(sizeof(sfxcache_t) + size - 1);
sfxcache_t *sc = sfx->cache = S_Malloc(sizeof(*sc) + size - 1);

sc->length = outcount;
sc->loopstart = s_info.loopstart == -1 ? -1 : s_info.loopstart / stepscale;
Expand Down Expand Up @@ -428,7 +428,7 @@ static void PaintChannels(int endtime)
}

// clear the paint buffer
memset(paintbuffer, 0, (end - s_paintedtime) * sizeof(samplepair_t));
memset(paintbuffer, 0, (end - s_paintedtime) * sizeof(paintbuffer[0]));

// copy from the streaming sound source
int stop = min(end, s_rawend);
Expand Down
6 changes: 3 additions & 3 deletions src/client/ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static void Keybind_Draw(menuKeybind_t *k)
if (k->altbinding[0]) {
Q_concat(string, sizeof(string), k->binding, " or ", k->altbinding);
} else if (k->binding[0]) {
strcpy(string, k->binding);
Q_strlcpy(string, k->binding, sizeof(string));
} else {
strcpy(string, "???");
}
Expand All @@ -261,10 +261,10 @@ static void Keybind_Push(menuKeybind_t *k)
if (key == -1) {
strcpy(k->binding, "???");
} else {
strcpy(k->binding, Key_KeynumToString(key));
Q_strlcpy(k->binding, Key_KeynumToString(key), sizeof(k->binding));
key = Key_EnumBindings(key + 1, k->cmd);
if (key != -1) {
strcpy(k->altbinding, Key_KeynumToString(key));
Q_strlcpy(k->altbinding, Key_KeynumToString(key), sizeof(k->altbinding));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/common/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void Cmd_AliasSet(const char *name, const char *cmd)
}

len = strlen(name);
a = Cmd_Malloc(sizeof(cmdalias_t) + len);
a = Cmd_Malloc(sizeof(*a) + len);
memcpy(a->name, name, len + 1);
a->value = Cmd_CopyString(cmd);

Expand Down Expand Up @@ -779,7 +779,7 @@ void Cmd_AddMacro(const char *name, xmacro_t function)
return;
}

macro = Cmd_Malloc(sizeof(cmd_macro_t));
macro = Cmd_Malloc(sizeof(*macro));
macro->name = name;
macro->function = function;
macro->next = cmd_macros;
Expand Down
7 changes: 4 additions & 3 deletions src/common/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -2648,7 +2648,7 @@ static void q_printf(2, 3) add_game_dir(unsigned mode, const char *fmt, ...)
Com_EPrintf("Couldn't load %s: %s\n", path, Com_GetLastError());
continue;
}
search = FS_Malloc(sizeof(searchpath_t));
search = FS_Malloc(sizeof(*search));
search->mode = mode;
search->filename[0] = 0;
search->pack = pack_get(pack);
Expand All @@ -2662,7 +2662,7 @@ static void q_printf(2, 3) add_game_dir(unsigned mode, const char *fmt, ...)

// add the directory to the search path
// the directory has priority over the pak files
search = FS_Malloc(sizeof(searchpath_t) + len);
search = FS_Malloc(sizeof(*search) + len);
search->mode = mode;
search->pack = NULL;
memcpy(search->filename, fs_gamedir, len + 1);
Expand Down Expand Up @@ -2852,7 +2852,8 @@ void **FS_ListFiles(const char *path, const char *filter, unsigned flags, int *c

// copy name off
if (flags & (FS_SEARCH_DIRSONLY | FS_SEARCH_STRIPEXT)) {
s = strcpy(buffer, s);
Q_strlcpy(buffer, s, sizeof(buffer));
s = buffer;
}

// hacky directory search support for pak files
Expand Down
52 changes: 26 additions & 26 deletions src/refresh/gl/models.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ int MOD_LoadMD2_GL(model_t *model, const void *rawdata, size_t length, const cha
char *src_skin;
maliasframe_t *dst_frame;
maliasvert_t *dst_vert;
maliasmesh_t *dst_mesh;
maliastc_t *dst_tc;
maliasmesh_t *mesh;
int i, j, k, val;
uint16_t remap[TESS_MAX_INDICES];
uint16_t vertIndices[TESS_MAX_INDICES];
Expand Down Expand Up @@ -124,26 +124,26 @@ int MOD_LoadMD2_GL(model_t *model, const void *rawdata, size_t length, const cha
model->type = MOD_ALIAS;
model->nummeshes = 1;
model->numframes = header.num_frames;
CHECK(model->meshes = MOD_Malloc(sizeof(maliasmesh_t)));
CHECK(model->frames = MOD_Malloc(header.num_frames * sizeof(maliasframe_t)));

dst_mesh = model->meshes;
dst_mesh->numtris = numindices / 3;
dst_mesh->numindices = numindices;
dst_mesh->numverts = numverts;
dst_mesh->numskins = header.num_skins;
CHECK(dst_mesh->verts = MOD_Malloc(numverts * header.num_frames * sizeof(maliasvert_t)));
CHECK(dst_mesh->tcoords = MOD_Malloc(numverts * sizeof(maliastc_t)));
CHECK(dst_mesh->indices = MOD_Malloc(numindices * sizeof(QGL_INDEX_TYPE)));
CHECK(dst_mesh->skins = MOD_Malloc(sizeof(image_t *) * header.num_skins));

if (dst_mesh->numtris != header.num_tris) {
Com_DPrintf("%s has %d bad triangles\n", model->name, header.num_tris - dst_mesh->numtris);
CHECK(model->meshes = MOD_Malloc(sizeof(model->meshes[0])));
CHECK(model->frames = MOD_Malloc(header.num_frames * sizeof(model->frames[0])));

mesh = model->meshes;
mesh->numtris = numindices / 3;
mesh->numindices = numindices;
mesh->numverts = numverts;
mesh->numskins = header.num_skins;
CHECK(mesh->verts = MOD_Malloc(numverts * header.num_frames * sizeof(mesh->verts[0])));
CHECK(mesh->tcoords = MOD_Malloc(numverts * sizeof(mesh->tcoords[0])));
CHECK(mesh->indices = MOD_Malloc(numindices * sizeof(mesh->indices[0])));
CHECK(mesh->skins = MOD_Malloc(header.num_skins * sizeof(mesh->skins[0])));

if (mesh->numtris != header.num_tris) {
Com_DPrintf("%s has %d bad triangles\n", model->name, header.num_tris - mesh->numtris);
}

// store final triangle indices
for (i = 0; i < numindices; i++) {
dst_mesh->indices[i] = finalIndices[i];
mesh->indices[i] = finalIndices[i];
}

// load all skins
Expand All @@ -154,13 +154,13 @@ int MOD_LoadMD2_GL(model_t *model, const void *rawdata, size_t length, const cha
goto fail;
}
FS_NormalizePath(skinname);
dst_mesh->skins[i] = IMG_Find(skinname, IT_SKIN, IF_NONE);
mesh->skins[i] = IMG_Find(skinname, IT_SKIN, IF_NONE);
src_skin += MD2_MAX_SKINNAME;
}

// load all tcoords
src_tc = (dmd2stvert_t *)((byte *)rawdata + header.ofs_st);
dst_tc = dst_mesh->tcoords;
dst_tc = mesh->tcoords;
scale_s = 1.0f / header.skinwidth;
scale_t = 1.0f / header.skinheight;
for (i = 0; i < numindices; i++) {
Expand All @@ -187,7 +187,7 @@ int MOD_LoadMD2_GL(model_t *model, const void *rawdata, size_t length, const cha
continue;
}
src_vert = &src_frame->verts[vertIndices[i]];
dst_vert = &dst_mesh->verts[j * numverts + finalIndices[i]];
dst_vert = &mesh->verts[j * numverts + finalIndices[i]];

dst_vert->pos[0] = src_vert->v[0];
dst_vert->pos[1] = src_vert->v[1];
Expand Down Expand Up @@ -293,10 +293,10 @@ static int MOD_LoadMD3Mesh(model_t *model, maliasmesh_t *mesh,
mesh->numindices = header.num_tris * 3;
mesh->numverts = header.num_verts;
mesh->numskins = header.num_skins;
CHECK(mesh->verts = MOD_Malloc(sizeof(maliasvert_t) * header.num_verts * model->numframes));
CHECK(mesh->tcoords = MOD_Malloc(sizeof(maliastc_t) * header.num_verts));
CHECK(mesh->indices = MOD_Malloc(sizeof(QGL_INDEX_TYPE) * header.num_tris * 3));
CHECK(mesh->skins = MOD_Malloc(sizeof(image_t *) * header.num_skins));
CHECK(mesh->verts = MOD_Malloc(sizeof(mesh->verts[0]) * header.num_verts * model->numframes));
CHECK(mesh->tcoords = MOD_Malloc(sizeof(mesh->tcoords[0]) * header.num_verts));
CHECK(mesh->indices = MOD_Malloc(sizeof(mesh->indices[0]) * header.num_tris * 3));
CHECK(mesh->skins = MOD_Malloc(sizeof(mesh->skins[0]) * header.num_skins));

// load all skins
src_skin = (dmd3skin_t *)(rawdata + header.ofs_skins);
Expand Down Expand Up @@ -398,8 +398,8 @@ int MOD_LoadMD3_GL(model_t *model, const void *rawdata, size_t length, const cha
model->type = MOD_ALIAS;
model->numframes = header.num_frames;
model->nummeshes = header.num_meshes;
CHECK(model->meshes = MOD_Malloc(sizeof(maliasmesh_t) * header.num_meshes));
CHECK(model->frames = MOD_Malloc(sizeof(maliasframe_t) * header.num_frames));
CHECK(model->meshes = MOD_Malloc(sizeof(model->meshes[0]) * header.num_meshes));
CHECK(model->frames = MOD_Malloc(sizeof(model->frames[0]) * header.num_frames));

// load all frames
src_frame = (dmd3frame_t *)((byte *)rawdata + header.ofs_frames);
Expand Down
4 changes: 2 additions & 2 deletions src/refresh/models.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ static int MOD_LoadSP2(model_t *model, const void *rawdata, size_t length, const
if (sizeof(dsp2header_t) + sizeof(dsp2frame_t) * header.numframes > length)
return Q_ERR_BAD_EXTENT;

Hunk_Begin(&model->hunk, sizeof(mspriteframe_t) * header.numframes);
Hunk_Begin(&model->hunk, sizeof(model->spriteframes[0]) * header.numframes);
model->type = MOD_SPRITE;

CHECK(model->spriteframes = MOD_Malloc(sizeof(mspriteframe_t) * header.numframes));
CHECK(model->spriteframes = MOD_Malloc(sizeof(model->spriteframes[0]) * header.numframes));
model->numframes = header.numframes;

src_frame = (dsp2frame_t *)((byte *)rawdata + sizeof(dsp2header_t));
Expand Down
40 changes: 20 additions & 20 deletions src/refresh/vkpt/models.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static void extract_model_lights(model_t* model)

// Actually extract the lights now

if (!(model->light_polys = Hunk_Alloc(&model->hunk, sizeof(light_poly_t) * num_lights))) {
if (!(model->light_polys = Hunk_Alloc(&model->hunk, sizeof(model->light_polys[0]) * num_lights))) {
Com_DPrintf("Warning: unable to allocate memory for %i light polygons.\n", num_lights);
return;
}
Expand Down Expand Up @@ -124,9 +124,9 @@ static void extract_model_lights(model_t* model)
assert(i1 < mesh->numverts);
assert(i2 < mesh->numverts);

memcpy(light->positions + 0, mesh->positions + i0, sizeof(vec3_t));
memcpy(light->positions + 3, mesh->positions + i1, sizeof(vec3_t));
memcpy(light->positions + 6, mesh->positions + i2, sizeof(vec3_t));
memcpy(light->positions + 0, mesh->positions + i0, sizeof(light->positions[0]));
memcpy(light->positions + 3, mesh->positions + i1, sizeof(light->positions[0]));
memcpy(light->positions + 6, mesh->positions + i2, sizeof(light->positions[0]));

// Cluster is assigned after model instancing and transformation
light->cluster = -1;
Expand Down Expand Up @@ -162,7 +162,7 @@ static void compute_missing_model_tangents(model_t* model)
if (mesh->tangents)
continue;

size_t tangent_size = mesh->numverts * model->numframes * sizeof(vec3_t);
size_t tangent_size = mesh->numverts * model->numframes * sizeof(mesh->tangents[0]);

mesh->tangents = MOD_Malloc(tangent_size);

Expand Down Expand Up @@ -373,19 +373,19 @@ int MOD_LoadMD2_RTX(model_t *model, const void *rawdata, size_t length, const ch
model->type = MOD_ALIAS;
model->nummeshes = 1;
model->numframes = header.num_frames;
CHECK(model->meshes = MOD_Malloc(sizeof(maliasmesh_t)));
CHECK(model->frames = MOD_Malloc(header.num_frames * sizeof(maliasframe_t)));
CHECK(model->meshes = MOD_Malloc(sizeof(model->meshes[0])));
CHECK(model->frames = MOD_Malloc(header.num_frames * sizeof(model->frames[0])));

dst_mesh = model->meshes;
dst_mesh->numtris = numindices / 3;
dst_mesh->numindices = numindices;
dst_mesh->numverts = numverts;
dst_mesh->numskins = header.num_skins;
CHECK(dst_mesh->positions = MOD_Malloc(numverts * header.num_frames * sizeof(vec3_t)));
CHECK(dst_mesh->normals = MOD_Malloc(numverts * header.num_frames * sizeof(vec3_t)));
CHECK(dst_mesh->tex_coords = MOD_Malloc(numverts * header.num_frames * sizeof(vec2_t)));
CHECK(dst_mesh->indices = MOD_Malloc(numindices * sizeof(int)));
CHECK(dst_mesh->materials = MOD_Malloc(sizeof(struct pbr_material_s*) * header.num_skins));
CHECK(dst_mesh->positions = MOD_Malloc(numverts * header.num_frames * sizeof(dst_mesh->positions[0])));
CHECK(dst_mesh->normals = MOD_Malloc(numverts * header.num_frames * sizeof(dst_mesh->normals[0])));
CHECK(dst_mesh->tex_coords = MOD_Malloc(numverts * header.num_frames * sizeof(dst_mesh->tex_coords[0])));
CHECK(dst_mesh->indices = MOD_Malloc(numindices * sizeof(dst_mesh->indices[0])));
CHECK(dst_mesh->materials = MOD_Malloc(sizeof(dst_mesh->materials[0]) * header.num_skins));

if (dst_mesh->numtris != header.num_tris) {
Com_DPrintf("%s has %d bad triangles\n", model->name, header.num_tris - dst_mesh->numtris);
Expand Down Expand Up @@ -586,11 +586,11 @@ static int MOD_LoadMD3Mesh(model_t *model, maliasmesh_t *mesh,
mesh->numindices = header.num_tris * 3;
mesh->numverts = header.num_verts;
mesh->numskins = header.num_skins;
CHECK(mesh->positions = MOD_Malloc(header.num_verts * model->numframes * sizeof(vec3_t)));
CHECK(mesh->normals = MOD_Malloc(header.num_verts * model->numframes * sizeof(vec3_t)));
CHECK(mesh->tex_coords = MOD_Malloc(header.num_verts * model->numframes * sizeof(vec2_t)));
CHECK(mesh->indices = MOD_Malloc(sizeof(int) * header.num_tris * 3));
CHECK(mesh->materials = MOD_Malloc(sizeof(struct pbr_material_s*) * header.num_skins));
CHECK(mesh->positions = MOD_Malloc(header.num_verts * model->numframes * sizeof(mesh->positions[0])));
CHECK(mesh->normals = MOD_Malloc(header.num_verts * model->numframes * sizeof(mesh->normals[0])));
CHECK(mesh->tex_coords = MOD_Malloc(header.num_verts * model->numframes * sizeof(mesh->tex_coords[0])));
CHECK(mesh->indices = MOD_Malloc(sizeof(mesh->indices[0]) * header.num_tris * 3));
CHECK(mesh->materials = MOD_Malloc(sizeof(mesh->materials[0]) * header.num_skins));

// load all skins
src_skin = (dmd3skin_t *)(rawdata + header.ofs_skins);
Expand Down Expand Up @@ -709,8 +709,8 @@ int MOD_LoadMD3_RTX(model_t *model, const void *rawdata, size_t length, const ch
model->type = MOD_ALIAS;
model->numframes = header.num_frames;
model->nummeshes = header.num_meshes;
CHECK(model->meshes = MOD_Malloc(sizeof(maliasmesh_t) * header.num_meshes));
CHECK(model->frames = MOD_Malloc(sizeof(maliasframe_t) * header.num_frames));
CHECK(model->meshes = MOD_Malloc(sizeof(model->meshes[0]) * header.num_meshes));
CHECK(model->frames = MOD_Malloc(sizeof(model->frames[0]) * header.num_frames));

// load all frames
src_frame = (dmd3frame_t *)((byte *)rawdata + header.ofs_frames);
Expand Down Expand Up @@ -778,7 +778,7 @@ int MOD_LoadIQM_RTX(model_t* model, const void* rawdata, size_t length, const ch
char base_path[MAX_QPATH];
COM_FilePath(mod_name, base_path, sizeof(base_path));

CHECK(model->meshes = MOD_Malloc(sizeof(maliasmesh_t) * model->iqmData->num_meshes));
CHECK(model->meshes = MOD_Malloc(sizeof(model->meshes[0]) * model->iqmData->num_meshes));
model->nummeshes = (int)model->iqmData->num_meshes;
model->numframes = 1; // these are baked frames, so that the VBO uploader will only make one copy of the vertices

Expand Down
4 changes: 2 additions & 2 deletions src/server/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ void SV_InitGame(unsigned mvd_spawn)

Cvar_ClampInteger(sv_reserved_slots, 0, sv_maxclients->integer - 1);

svs.client_pool = SV_Mallocz(sizeof(client_t) * sv_maxclients->integer);
svs.client_pool = SV_Mallocz(sizeof(svs.client_pool[0]) * sv_maxclients->integer);

svs.num_entities = sv_maxclients->integer * UPDATE_BACKUP * MAX_PACKET_ENTITIES;
svs.entities = SV_Mallocz(sizeof(entity_packed_t) * svs.num_entities);
svs.entities = SV_Mallocz(sizeof(svs.entities[0]) * svs.num_entities);

#if USE_ZLIB
svs.z.zalloc = SV_zalloc;
Expand Down
8 changes: 4 additions & 4 deletions src/server/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ static client_t *find_client_slot(conn_params_t *params)
FOR_EACH_CLIENT(cl) {
if (NET_IsEqualAdr(&net_from, &cl->netchan.remote_address)) {
if (cl->state == cs_zombie) {
strcpy(params->reconnect_var, cl->reconnect_var);
strcpy(params->reconnect_val, cl->reconnect_val);
Q_strlcpy(params->reconnect_var, cl->reconnect_var, sizeof(params->reconnect_var));
Q_strlcpy(params->reconnect_val, cl->reconnect_val, sizeof(params->reconnect_val));
} else {
SV_DropClient(cl, "reconnected");
}
Expand Down Expand Up @@ -1107,8 +1107,8 @@ static void SVC_DirectConnect(void)
newcl->spawncount = sv.spawncount;
newcl->maxclients = sv_maxclients->integer;
newcl->last_valid_cluster = -1;
strcpy(newcl->reconnect_var, params.reconnect_var);
strcpy(newcl->reconnect_val, params.reconnect_val);
Q_strlcpy(newcl->reconnect_var, params.reconnect_var, sizeof(newcl->reconnect_var));
Q_strlcpy(newcl->reconnect_val, params.reconnect_val, sizeof(newcl->reconnect_val));
#if USE_FPS
newcl->framediv = sv.framediv;
newcl->settings[CLS_FPS] = BASE_FRAMERATE;
Expand Down
2 changes: 1 addition & 1 deletion src/server/mvd/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ static void MVD_IntermissionStart(mvd_t *mvd)
// save oldscores
// FIXME: unfortunately this will also reset oldscores during
// match timeout with certain mods (OpenTDM should work fine though)
strcpy(mvd->oldscores, mvd->layout);
Q_strlcpy(mvd->oldscores, mvd->layout, sizeof(mvd->oldscores));
#endif

// force all clients to switch to the MVD dummy
Expand Down
4 changes: 2 additions & 2 deletions src/server/mvd/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void MVD_UnicastLayout(mvd_t *mvd, mvd_player_t *player)

// HACK: if we got "match ended" string this frame, save oldscores
if (match_ended_hack) {
strcpy(mvd->oldscores, mvd->layout);
Q_strlcpy(mvd->oldscores, mvd->layout, sizeof(mvd->oldscores));
}

if (mvd->demoseeking || !mvd->dummy)
Expand Down Expand Up @@ -837,7 +837,7 @@ void MVD_ClearState(mvd_t *mvd, bool full)

if (mvd->intermission) {
// save oldscores
//strcpy(mvd->oldscores, mvd->layout);
//Q_strlcpy(mvd->oldscores, mvd->layout, sizeof(mvd->oldscores));
}

memset(mvd->configstrings, 0, sizeof(mvd->configstrings));
Expand Down
2 changes: 1 addition & 1 deletion src/server/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ void SV_InitClientSend(client_t *newcl)
List_Init(&newcl->msg_unreliable_list);
List_Init(&newcl->msg_reliable_list);

newcl->msg_pool = SV_Malloc(sizeof(message_packet_t) * MSG_POOLSIZE);
newcl->msg_pool = SV_Malloc(sizeof(newcl->msg_pool[0]) * MSG_POOLSIZE);
for (i = 0; i < MSG_POOLSIZE; i++) {
List_Append(&newcl->msg_free_list, &newcl->msg_pool[i].entry);
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ static void stuff_junk(void)
junk[i][15] = 0;
}

strcpy(sv_client->reconnect_var, junk[2]);
strcpy(sv_client->reconnect_val, junk[3]);
Q_strlcpy(sv_client->reconnect_var, junk[2], sizeof(sv_client->reconnect_var));
Q_strlcpy(sv_client->reconnect_val, junk[3], sizeof(sv_client->reconnect_val));

SV_ClientCommand(sv_client, "set %s set\n", junk[0]);
SV_ClientCommand(sv_client, "$%s %s connect\n", junk[0], junk[1]);
Expand Down

0 comments on commit c2b7d44

Please sign in to comment.