Pārlūkot izejas kodu

* fixed datadef for untyped string constants (terminating #0 is one
character, not two)

git-svn-id: branches/hlcgllvm@28320 -

Jonas Maebe 11 gadi atpakaļ
vecāks
revīzija
4f906fb9c9
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      compiler/llvm/nllvmcon.pas

+ 1 - 1
compiler/llvm/nllvmcon.pas

@@ -69,7 +69,7 @@ implementation
                   constants (-> excludes terminating #0) and pchars (-> includes
                   constants (-> excludes terminating #0) and pchars (-> includes
                   terminating #0). The resultdef excludes the #0 while the data
                   terminating #0). The resultdef excludes the #0 while the data
                   includes it -> insert typecast from datadef to resultdef }
                   includes it -> insert typecast from datadef to resultdef }
-                datadef:=getarraydef(cansichartype,len+2);
+                datadef:=getarraydef(cansichartype,len+1);
               cst_shortstring:
               cst_shortstring:
                 { the resultdef of the string constant is the type of the
                 { the resultdef of the string constant is the type of the
                   string to which it is assigned, which can be longer or shorter
                   string to which it is assigned, which can be longer or shorter