[fpc-devel][FPC1.1] SetString(AnsiString,...) and #0
    Dimitry Sibiryakov 
    SD at topol.udm.net
       
    Fri Jan 24 12:35:20 CET 2003
    
    
  
  Hi, All!
  I think current behavior of SetString is incorrect. AnsiString may 
contain #0's so SetString shouldn't care about Buf's content.
  BTW, what if Len=0?
astrings.inc.diff:
805,806d804
< var
<   BufLen: longint;
810,815c808
<     begin
<       BufLen := StrLen(Buf);
<       If (BufLen < Len) then
<         Len := BufLen;
<       Move (Buf[0],S[1],Len);
<     end;
---
>     Move (Buf[0],S[1],Len);
   SY, Dimitry Sibiryakov.
    
    
More information about the fpc-devel
mailing list