Browse Source

* give (w)string tconstsyms a def, so all constsyms always have a def

git-svn-id: trunk@22020 -
Jonas Maebe 13 years ago
parent
commit
ebda98deec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/symsym.pas

+ 2 - 2
compiler/symsym.pas

@@ -2035,7 +2035,7 @@ implementation
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          value.valueptr:=str;
          value.valueptr:=str;
-         constdef:=nil;
+         constdef:=getarraydef(cansichartype,l);
          value.len:=l;
          value.len:=l;
       end;
       end;
 
 
@@ -2046,7 +2046,7 @@ implementation
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          pcompilerwidestring(value.valueptr):=pw;
          pcompilerwidestring(value.valueptr):=pw;
-         constdef:=nil;
+         constdef:=getarraydef(cwidechartype,getlengthwidestring(pw));
          value.len:=getlengthwidestring(pw);
          value.len:=getlengthwidestring(pw);
       end;
       end;