2
0
Michaël Van Canneyt 4 сар өмнө
parent
commit
1a57a65c5f
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      compiler/aasmcnst.pas

+ 1 - 1
compiler/aasmcnst.pas

@@ -1717,7 +1717,7 @@ implementation
        { terminating zero included }
        datadef:=carraydef.getreusable(cansichartype,len+1);
        datatcb.maybe_begin_aggregate(datadef);
-       ts:=tai_string.create_pchar(data,len);
+       ts:=tai_string.create_pchar(data,len+1); // +1 to include terminating 0
        datatcb.emit_tai(ts,datadef);
        datatcb.maybe_end_aggregate(datadef);
        ansistrrecdef:=datatcb.end_anonymous_record;