Changeset 90707f in git


Ignore:
Timestamp:
Jun 20, 2012, 2:41:30 PM (11 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '2234726c50d679d6664181a5c72f75a6fd64a787')
Children:
3d69257fe19a1e388e6e33fc7381ea50cf3041cb
Parents:
33337c143d6dc39838d00eaa1ff98d10aab9f874
git-author:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-06-20 14:41:30+02:00
git-committer:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 22:59:17+02:00
Message:
fix: don't segfault when assigning non-newstructed custom types to newstructs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/newstruct.cc

    r33337c r90707f  
    138138    {
    139139      newstruct_desc rrn=(newstruct_desc)rr->data;
     140
     141      if (!rrn)
     142      {
     143        Werror("custom type %s(%d) cannot be assigned to newstructed type %s(%d)",
     144               Tok2Cmdname(r->Typ()), r->Typ(), Tok2Cmdname(l->Typ()), l->Typ());
     145        return TRUE;
     146      }
     147
    140148      newstruct_desc rrp=rrn->parent;
    141149      while ((rrp!=NULL)&&(rrp->id!=l->Typ())) rrp=rrp->parent;
Note: See TracChangeset for help on using the changeset viewer.