From a609672d19a9fe8f3dd8c97766e228e5526e80e8 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 12 Sep 2013 12:43:08 +0000 Subject: [PATCH] Fix loading of common.LANGUAGE.po. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12002 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=9772a3d686ff2cb9958dc3450bd23aca608c20d8 --- prvm_edict.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prvm_edict.c b/prvm_edict.c index 22be6c17..bb30302e 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1687,7 +1687,7 @@ static void PRVM_PO_ParseString(char *out, const char *in, size_t outsize) } static po_t *PRVM_PO_Load(const char *filename, const char *filename2, mempool_t *pool) { - po_t *po; + po_t *po = NULL; const char *p, *q; int mode; char inbuf[MAX_INPUTLINE]; @@ -1922,6 +1922,7 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da u; unsigned int d; char vabuf[1024]; + char vabuf2[1024]; if (prog->loaded) prog->error_cmd("PRVM_LoadProgs: there is already a %s program loaded!", prog->name ); @@ -2303,7 +2304,10 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da } else { - po_t *po = PRVM_PO_Load(va(vabuf, sizeof(vabuf), "%s.%s.po", realfilename, prvm_language.string), "common.po", prog->progs_mempool); + po_t *po = PRVM_PO_Load( + va(vabuf, sizeof(vabuf), "%s.%s.po", realfilename, prvm_language.string), + va(vabuf2, sizeof(vabuf2), "common.%s.po", prvm_language.string), + prog->progs_mempool); if(po) { for (i=0 ; inumglobaldefs ; i++) -- 2.39.2