Fixed a crash when loading a script, on non-MSVC binaries

This commit is contained in:
smallmodel 2023-08-16 16:07:31 +02:00
parent c274af839e
commit 9eaecb0a2a
No known key found for this signature in database
GPG key ID: A96F163ED4891440
3 changed files with 6 additions and 4 deletions

View file

@ -241,7 +241,7 @@ func_prim_expr:
;
event_parameter_list
: { $$ = sval_u{}; }
: { $$ = sval_u{}; $$.node = NULL; }
| event_parameter { $$ = $1; }
;

View file

@ -2265,7 +2265,7 @@ yyreduce:
case 71: /* event_parameter_list: %empty */
#line 244 "/usr/src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = sval_u{}; }
{ (yyval.s.val) = sval_u{}; (yyval.s.val).node = NULL; }
#line 2270 "/usr/src/openmohaa/code/parser/generated/yyParser.cpp"
break;

View file

@ -74,7 +74,7 @@ typedef enum {
ENUM_define
} sval_type_e;
typedef union sval_u {
union sval_u {
int type;
const char *stringValue;
float floatValue;
@ -86,7 +86,9 @@ typedef union sval_u {
int HasExternal;
union sval_u *node;
unsigned int sourcePosValue;
} sval_t;
};
using sval_t = sval_u;
struct stype_t {
sval_t val;