mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-27 21:50:53 +00:00
don't _move_ values out of immediates, it causes NULL strings to be code-generated
This commit is contained in:
parent
02cc86db25
commit
92e8f08df3
1 changed files with 4 additions and 2 deletions
4
parser.c
4
parser.c
|
@ -2450,8 +2450,10 @@ nextvar:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var->isconst = true;
|
var->isconst = true;
|
||||||
|
if (cval->expression.vtype == TYPE_STRING)
|
||||||
|
var->constval.vstring = parser_strdup(cval->constval.vstring);
|
||||||
|
else
|
||||||
memcpy(&var->constval, &cval->constval, sizeof(var->constval));
|
memcpy(&var->constval, &cval->constval, sizeof(var->constval));
|
||||||
memset(&cval->constval, 0, sizeof(cval->constval));
|
|
||||||
ast_unref(cval);
|
ast_unref(cval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue