Skip to content

Commit

Permalink
Merge pull request #185 from Y-Less/master
Browse files Browse the repository at this point in the history
Document correct state transition target name.
  • Loading branch information
Zeex authored Oct 7, 2017
2 parents 6e08f46 + 0a43fab commit 0fab187
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/compiler/sc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6629,7 +6629,6 @@ static void dosleep(void)

static void dostate(void)
{
char name[sNAMEMAX+1];
constvalue *automaton;
constvalue *state;
constvalue *stlist;
Expand Down Expand Up @@ -6698,13 +6697,13 @@ static void dostate(void)
listid=-1;
} /* if */
listindex=0;
length=strlen(name)+70; /* +70 for the fixed part "<transition ... />\n" */
length=strlen(state->name)+70; /* +70 for the fixed part "<transition ... />\n" */
/* see if there are any condition strings to attach */
for (index=0; (str=get_autolist(index))!=NULL; index++)
length+=strlen(str);
if ((doc=(char*)malloc(length*sizeof(char)))!=NULL) {
do {
sprintf(doc,"<transition target=\"%s\"",name);
sprintf(doc,"<transition target=\"%s\"",state->name);
if (listid>=0) {
/* get the source state */
stateindex=state_listitem(listid,listindex);
Expand Down

0 comments on commit 0fab187

Please sign in to comment.