Browse Source

* fix max macro length check

git-svn-id: trunk@650 -
peter 20 years ago
parent
commit
3051c91530
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/scanner.pas

+ 2 - 2
compiler/scanner.pas

@@ -935,7 +935,7 @@ implementation
                end;
                end;
                macrobuffer^[macropos]:=c;
                macrobuffer^[macropos]:=c;
                inc(macropos);
                inc(macropos);
-               if macropos>maxmacrolen then
+               if macropos>=maxmacrolen then
                  Message(scan_f_macro_buffer_overflow);
                  Message(scan_f_macro_buffer_overflow);
                current_scanner.readchar;
                current_scanner.readchar;
              until false;
              until false;
@@ -1725,7 +1725,7 @@ implementation
                  preprocstack.accept:=false;
                  preprocstack.accept:=false;
                  preprocstack.typ:=pp_elseif;
                  preprocstack.typ:=pp_elseif;
                end
                end
-           else if (not(assigned(preprocstack.next)) or (preprocstack.next.accept)) 
+           else if (not(assigned(preprocstack.next)) or (preprocstack.next.accept))
                    and compile_time_predicate(valuedescr) then
                    and compile_time_predicate(valuedescr) then
                begin
                begin
                  preprocstack.name:=valuedescr;
                  preprocstack.name:=valuedescr;