File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -835,7 +835,7 @@ sub cForStmtBegin( )
835835 end if
836836
837837 if ( stk-> for .end.sym = NULL and stk-> for .ispos.sym = NULL ) then
838- dim as integer toobig = 0
838+ dim as integer toobig = FALSE
839839 if ( stk-> for .ispos.value.i ) then
840840 select case as const typeGetSizeType( stk-> for .cnt.dtype )
841841 case FB_SIZETYPE_INT8
@@ -862,11 +862,13 @@ sub cForStmtBegin( )
862862 case FB_SIZETYPE_INT8
863863 toobig = (stk-> for .end.value.i <= - 128 )
864864 case FB_SIZETYPE_INT16
865- toobig = (stk-> for .end.value.i > = - 32768 )
865+ toobig = (stk-> for .end.value.i < = - 32768 )
866866 case FB_SIZETYPE_INT32
867- toobig = (stk-> for .end.value.i > = - 2147483648 )
867+ toobig = (stk-> for .end.value.i < = - 2147483648 )
868868 case FB_SIZETYPE_INT64
869- toobig = (stk-> for .end.value.i >= - 9223372036854775808 )
869+ '' can't test with '<=' comparison here otherwise
870+ '' condition is always true on 64-bit integer counters
871+ toobig = (stk-> for .end.value.i = - 9223372036854775808 )
870872 end select
871873 end if
872874 if ( toobig ) then
You can’t perform that action at this time.
0 commit comments