don't _move_ values out of immediates, it causes NULL strings to be code-generated

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-21 10:08:17 +02:00
parent 02cc86db25
commit 92e8f08df3

View file

@ -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);
}
}