From: Cloudwalk Date: Tue, 21 Jul 2020 19:07:24 +0000 (-0400) Subject: prvm_edict: Add missing typecasts to fix alignment problem X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=90510a89b93775ea7f7b684f96a8f19c829c33f0;p=xonotic%2Fdarkplaces.git prvm_edict: Add missing typecasts to fix alignment problem --- diff --git a/prvm_edict.c b/prvm_edict.c index fa6ecbc3..1f8700c9 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -2126,8 +2126,8 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da default: for (i=0 ; inumglobaldefs ; i++) { - prog->globaldefs[i].type = LittleShort(inglobaldefs16[i].type); - prog->globaldefs[i].ofs = LittleShort(inglobaldefs16[i].ofs); + prog->globaldefs[i].type = (unsigned short)LittleShort(inglobaldefs16[i].type); + prog->globaldefs[i].ofs = (unsigned short)LittleShort(inglobaldefs16[i].ofs); prog->globaldefs[i].s_name = LittleLong(inglobaldefs16[i].s_name); // TODO bounds check ofs, s_name }