mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +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
6
parser.c
6
parser.c
|
@ -2450,8 +2450,10 @@ nextvar:
|
|||
else
|
||||
{
|
||||
var->isconst = true;
|
||||
memcpy(&var->constval, &cval->constval, sizeof(var->constval));
|
||||
memset(&cval->constval, 0, sizeof(cval->constval));
|
||||
if (cval->expression.vtype == TYPE_STRING)
|
||||
var->constval.vstring = parser_strdup(cval->constval.vstring);
|
||||
else
|
||||
memcpy(&var->constval, &cval->constval, sizeof(var->constval));
|
||||
ast_unref(cval);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue