Skip to content

Commit

Permalink
Initialize REBVAL in array returned from Alloc_Signular_Array
Browse files Browse the repository at this point in the history
The REBVAL in the array is not initialized, so Kill_Series will fail
  • Loading branch information
zsx committed Oct 20, 2016
1 parent 0b03d37 commit e82404f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/t-struct.c
Expand Up @@ -1348,6 +1348,10 @@ void MAKE_Struct(REBVAL *out, enum Reb_Kind type, const REBVAL *arg) {

REBSTU *stu = Alloc_Singular_Array();

// Set it to blank so the Kill_Series can be called upon in case of error thrown
// before it is fully constructed.
SET_BLANK(ARR_HEAD(stu));

MANAGE_SERIES(field_1);
ARR_SERIES(stu)->link.schema = field_1;

Expand Down

0 comments on commit e82404f

Please sign in to comment.