Commit 580daa09 authored by Claes Sjofors's avatar Claes Sjofors

Plc code generation, check for invalid compile method

parent 496f4bac
......@@ -127,6 +127,7 @@ compileparent <Compile parent window> /info
disabled <Object is disabled> /error
maxsize <MaxSize is larger than cell size> /error
noseqreset <No SequenceReset object found in main object> /error
compmethod <Invalid compile method> /error
.facility FOE,280 /prefix = FOE__ ! Function object editor
......
......@@ -4408,7 +4408,11 @@ static int gcg_node_comp(
if ( EVEN(sts)) return sts;
compmethod = graphbody->compmethod;
// printf( "Compiling %s\n", node->hn.name);
if ( compmethod < 2 || compmethod >= (int)(sizeof(gcg_comp_m)/sizeof(gcg_comp_m[0]))) {
gcg_error_msg( gcgctx, GSX__COMPMETHOD, node);
return GSX__COMPMETHOD;
}
sts = (gcg_comp_m[ compmethod ]) (gcgctx, node);
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment