Browse Source

* patch by rika: simplify tscannerfile.readstring, resolves #39835

florian 3 years ago
parent
commit
8363c48863
1 changed files with 5 additions and 20 deletions
  1. 5 20
      compiler/scanner.pas

+ 5 - 20
compiler/scanner.pas

@@ -4162,32 +4162,17 @@ type
           case c of
           case c of
             '_',
             '_',
             '0'..'9',
             '0'..'9',
-            'A'..'Z' :
-              begin
-                if i<255 then
-                 begin
-                   inc(i);
-                   orgpattern[i]:=c;
-                   pattern[i]:=c;
-                 end
-                else
-                 begin
-                   if not err then
-                     begin
-                       Message(scan_e_string_exceeds_255_chars);
-                       err:=true;
-                     end;
-                 end;
-                c:=inputpointer^;
-                inc(inputpointer);
-              end;
+            'A'..'Z',
             'a'..'z' :
             'a'..'z' :
               begin
               begin
                 if i<255 then
                 if i<255 then
                  begin
                  begin
                    inc(i);
                    inc(i);
                    orgpattern[i]:=c;
                    orgpattern[i]:=c;
-                   pattern[i]:=chr(ord(c)-32)
+                   if c in ['a'..'z'] then
+                     pattern[i]:=chr(ord(c)-32)
+                   else
+                     pattern[i]:=c;
                  end
                  end
                 else
                 else
                  begin
                  begin