瀏覽代碼

* adds additional "quote" checks to maybequoted function for various chars in names

git-svn-id: trunk@4792 -
Almindor 19 年之前
父節點
當前提交
2978e6661a
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      compiler/cutils.pas

+ 8 - 2
compiler/cutils.pas

@@ -808,8 +808,14 @@ uses
                  quoted:=true;
                  s1:=s1+s[i];
                end;
-             else
-               s1:=s1+s[i];
+             else begin
+               if s[i] in ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
+                           '{', '}', '''', ';', ':', '\', '`', '~'] then begin
+                 quoted:=True;
+                 s1:=s1 + s[i];
+               end else
+                 s1:=s1+s[i];
+             end;
            end;
          end;
         if quoted then