ir_block *cond = func->curblock;
ir_block *ontrue;
ir_block *onfalse;
- ir_block *ontrue_endblock;
- ir_block *onfalse_endblock;
+ ir_block *ontrue_endblock = NULL;
+ ir_block *onfalse_endblock = NULL;
ir_block *merge;
/* We don't output any value, thus also don't care about r/lvalue */
case TYPE_FLOAT:
{
if (global->isconst) {
- iptr = (int32_t*)&global->constval.vfloat;
+ iptr = (int32_t*)&global->constval.ivec[0];
ir_value_code_setaddr(global, code_globals_add(*iptr));
} else {
ir_value_code_setaddr(global, code_globals_add(0));
{
size_t d;
if (global->isconst) {
- iptr = (int32_t*)&global->constval.vvec;
+ iptr = (int32_t*)&global->constval.ivec[0];
ir_value_code_setaddr(global, code_globals_add(iptr[0]));
if (global->code.globaladdr < 0)
return false;
float vfloat;
int vint;
vector vvec;
+ int32_t ivec[3];
char *vstring;
struct ir_value_s *vpointer;
struct ir_function_s *vfunc;
static sy_elem syexp(lex_ctx ctx, ast_expression *v) {
sy_elem e;
e.etype = 0;
+ e.off = 0;
e.out = v;
e.block = NULL;
e.ctx = ctx;
static sy_elem syblock(lex_ctx ctx, ast_block *v) {
sy_elem e;
e.etype = 0;
+ e.off = 0;
e.out = (ast_expression*)v;
e.block = v;
e.ctx = ctx;
static sy_elem syop(lex_ctx ctx, const oper_info *op) {
sy_elem e;
e.etype = 1 + (op - operators);
+ e.off = 0;
e.out = NULL;
e.block = NULL;
e.ctx = ctx;
ast_expression *framenum = NULL;
ast_expression *nextthink = NULL;
/* None of the following have to be deleted */
- ast_expression *fld_think, *fld_nextthink, *fld_frame;
- ast_expression *gbl_time, *gbl_self;
+ ast_expression *fld_think = NULL, *fld_nextthink = NULL, *fld_frame = NULL;
+ ast_expression *gbl_time = NULL, *gbl_self = NULL;
bool has_frame_think;
bool retval = true;