File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1639,6 +1639,21 @@ ret_code HllStartDir(int i, struct asm_tok tokenarray[])
1639
1639
hll -> labels [LTEST ] = 0 ;
1640
1640
hll -> flags = 0 ;
1641
1641
hll -> cmd = HLL_FOR ;
1642
+ /* check for 2 ':',if not throw an error */
1643
+ p = tokenarray [i ].tokpos ;
1644
+ for (b = 0 ; * p ; p ++ )
1645
+ {
1646
+ if (* p == ':' ) b ++ ;
1647
+ if (* p == 39 ) break ;
1648
+ }
1649
+ if (b < 2 ) {
1650
+ DebugMsg (("HllStartDir .for loop \n" ));
1651
+ return (EmitError (SYNTAX_ERROR_EX , "Missing ':' before ')'" ));
1652
+ }
1653
+ else if (b > 2 ) {
1654
+ DebugMsg (("HllStartDir .for loop \n" ));
1655
+ return (EmitError (SYNTAX_ERROR_EX , "Only 2 ':' allowed before ')'" ));
1656
+ }
1642
1657
//copy string to the buffer and get read of spaces
1643
1658
p = tokenarray [i ].tokpos ;
1644
1659
for (b = 0 ; * p ; p ++ )
You can’t perform that action at this time.
0 commit comments