@@ -1522,7 +1522,7 @@ static BOOL interpret(LmnReactCxt *rc, LmnRule rule, LmnRuleInstr instr)
15221522 }else {
15231523 /* シンボルアトムatom1とシンボルアトムap2 */
15241524 //////
1525- if (ap2 ){
1525+ if (ap2 != NULL ){
15261526 LMN_SATOM_SET_LINK (ap2 , attr2 , wt (rc , atom1 ));
15271527 LMN_SATOM_SET_ATTR (ap2 , attr2 , pos1 );
15281528 LMN_SATOM_SET_LINK (LMN_SATOM (wt (rc , atom1 )), pos1 , ap2 );
@@ -1553,7 +1553,7 @@ static BOOL interpret(LmnReactCxt *rc, LmnRule rule, LmnRuleInstr instr)
15531553 }else if (!LMN_ATTR_IS_EX (at (rc , atom1 )) && !LMN_ATTR_IS_EX (attr2 )){
15541554 /* シンボルアトムatom1とシンボルアトムap2 */
15551555 //////
1556- if (ap2 ){
1556+ if (ap2 != NULL ){
15571557 LMN_SATOM_SET_LINK (ap2 , attr2 , wt (rc , atom1 ));
15581558 LMN_SATOM_SET_ATTR (ap2 , attr2 , pos1 );
15591559 LMN_SATOM_SET_LINK (LMN_SATOM (wt (rc , atom1 )), pos1 , ap2 );
@@ -1573,7 +1573,7 @@ static BOOL interpret(LmnReactCxt *rc, LmnRule rule, LmnRuleInstr instr)
15731573 && !LMN_ATTR_IS_EX (attr1 ) && !LMN_ATTR_IS_EX (attr2 )){
15741574 /* シンボルアトムatom2とシンボルアトムap1 */
15751575
1576- if (ap1 ){
1576+ if (ap1 != NULL ){
15771577 LMN_SATOM_SET_LINK (LMN_SATOM (wt (rc , atom2 )), pos2 , ap1 );
15781578 LMN_SATOM_SET_ATTR (LMN_SATOM (wt (rc , atom2 )), pos2 , LMN_ATTR_GET_VALUE (attr1 ));
15791579 LMN_SATOM_SET_LINK (ap1 , attr1 , wt (rc , atom2 ));
@@ -1593,7 +1593,7 @@ static BOOL interpret(LmnReactCxt *rc, LmnRule rule, LmnRuleInstr instr)
15931593 }else {
15941594 /* シンボルアトムatom1とシンボルアトムap2 */
15951595 //////
1596- if (ap2 ){
1596+ if (ap2 != NULL ){
15971597 LMN_SATOM_SET_LINK (ap2 , LMN_ATTR_GET_VALUE (attr2 ), wt (rc , atom1 ));
15981598 LMN_SATOM_SET_ATTR (ap2 , LMN_ATTR_GET_VALUE (attr2 ), pos1 );
15991599 LMN_SATOM_SET_LINK (LMN_SATOM (wt (rc , atom1 )), pos1 , ap2 );
@@ -1795,6 +1795,18 @@ static BOOL interpret(LmnReactCxt *rc, LmnRule rule, LmnRuleInstr instr)
17951795 move_atom_to_atom_tail ((LmnSAtom )wt (rc ,atomi ),(LmnSAtom )wt (rc ,atomi2 ),(LmnMembrane * )wt (rc ,memi ));
17961796 break ;
17971797 }
1798+ case INSTR_MEMSETLINK :
1799+ {
1800+ LmnInstrVar atomi , link ;
1801+
1802+ READ_VAL (LmnInstrVar , instr , atomi );
1803+ READ_VAL (LmnInstrVar , instr , link );
1804+
1805+
1806+ LMN_SATOM_SET_LINK (wt (rc ,atomi ), link , NULL );
1807+
1808+ break ;
1809+ }
17981810 case INSTR_NEWMEM :
17991811 {
18001812 LmnInstrVar newmemi , parentmemi , memf ;
0 commit comments