diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index d782351a8..affaae1ad 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -5224,13 +5224,19 @@ static void CL_ParseSetInfo (void) if (cls.fteprotocolextensions2 & PEXT2_INFOBLOBS) key = InfoBuf_DecodeString(temp, temp+strlen(temp), &keysize); else + { + keysize = strlen(temp); key = Z_StrDup(temp); + } temp = MSG_ReadString(); if (cls.fteprotocolextensions2 & PEXT2_INFOBLOBS) val = InfoBuf_DecodeString(temp, temp+strlen(temp), &valsize); else + { + valsize = strlen(temp); val = Z_StrDup(temp); + } if (slot == 255) InfoBuf_SyncReceive(&cl.serverinfo, key, keysize, val, valsize, offset, final); diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index 430326e39..a64ad8c24 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -5184,7 +5184,7 @@ static qboolean QDECL Mod_LoadBrushModel (model_t *mod, void *buffer, size_t fsi { //pre-phong versions of tyrutils wrote misaligned lumps. These crash on arm/etc. char *tmp; int ofs = 0; - Con_Printf(CON_WARNING"%s: Misaligned lumps detected\n", mod->name); + Con_DPrintf(CON_WARNING"%s: Misaligned lumps detected\n", mod->name); tmp = BZ_Malloc(fsize); memcpy(tmp, mod_base, fsize); for (i = 0; i < HEADER_LUMPS; i++) diff --git a/engine/qclib/pr_edict.c b/engine/qclib/pr_edict.c index 1fe630bbf..725756858 100644 --- a/engine/qclib/pr_edict.c +++ b/engine/qclib/pr_edict.c @@ -1801,9 +1801,11 @@ char *PDECL PR_SaveEnts(pubprogfuncs_t *ppf, char *buf, size_t *bufofs, size_t b //write the ents for (a = 0; a < sv_num_edicts; a++) { + char head[64]; edictrun_t *ed = (edictrun_t *)EDICT_NUM(progfuncs, a); - AddS ("{\n"); + QC_snprintfz(head, sizeof(head), "{//%i\n", a); + AddS (head); if (ed->ereftype == ER_ENTITY) //free entities write a {} with no data. the loader detects this specifically. ED_WriteEdict(progfuncs, ed, buf, bufofs, bufmax, true); @@ -2207,9 +2209,7 @@ int PDECL PR_LoadEnts(pubprogfuncs_t *ppf, const char *file, void *ctx, void (PD } else { - ed = (edictrun_t *)EDICT_NUM(progfuncs, numents); - if (!ed) - ed = ED_AllocIntoTable(progfuncs, numents, false, prinst.fields_size); + ed = ED_AllocIntoTable(progfuncs, numents, false, prinst.fields_size); if (externs->entspawn) externs->entspawn((struct edict_s *) ed, true);