|
@@ -2428,10 +2428,9 @@ implementation
|
|
|
inherited Create;
|
|
|
typ:=ait_string;
|
|
|
lNewLen:=length(_str);
|
|
|
- setlength(str,lNewLen+1);
|
|
|
+ setlength(str,lNewLen);
|
|
|
if lNewLen>0 then
|
|
|
move(_str[1],str[0],lNewLen);
|
|
|
- str[lNewLen]:=#0;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -2442,10 +2441,9 @@ implementation
|
|
|
inherited Create;
|
|
|
typ:=ait_string;
|
|
|
lNewLen:=length(_str);
|
|
|
- setlength(str,lNewlen+1);
|
|
|
+ setlength(str,lNewlen);
|
|
|
if lNewLen>0 then
|
|
|
move(_str[1],str[0],lNewLen);
|
|
|
- str[lNewLen]:=#0;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -2453,15 +2451,11 @@ implementation
|
|
|
begin
|
|
|
inherited Create;
|
|
|
typ:=ait_string;
|
|
|
- setlength(str,length+ord(add0)+1);
|
|
|
+ setlength(str,length+ord(add0));
|
|
|
if length>0 then
|
|
|
move(data^,str[0],length);
|
|
|
if add0 then
|
|
|
- begin
|
|
|
- str[length]:=#0;
|
|
|
- inc(length);
|
|
|
- end;
|
|
|
- str[length]:=#0;
|
|
|
+ str[length]:=#0;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -2477,9 +2471,8 @@ implementation
|
|
|
begin
|
|
|
inherited ppuload(t,ppufile);
|
|
|
lNewLen:=ppufile.getlongint;
|
|
|
- setlength(str,lNewLen+1);
|
|
|
+ setlength(str,lNewLen);
|
|
|
ppufile.getdata(str[0],lnewlen);
|
|
|
- str[lNewLen]:=#0;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -2488,7 +2481,7 @@ implementation
|
|
|
lWriteLen : integer;
|
|
|
begin
|
|
|
inherited ppuwrite(ppufile);
|
|
|
- lWriteLen:=length(str)-1;
|
|
|
+ lWriteLen:=length(str);
|
|
|
ppufile.putlongint(lWriteLen);
|
|
|
ppufile.putdata(str[0],lWriteLen);
|
|
|
end;
|
|
@@ -2502,7 +2495,6 @@ implementation
|
|
|
p:=inherited getcopy;
|
|
|
lWriteLen:=length(str);
|
|
|
setlength(tai_string(p).str,lWriteLen);
|
|
|
- // move #0 at the end too.
|
|
|
move(str[0],tai_string(p).str[0],lWriteLen);
|
|
|
getcopy:=p;
|
|
|
end;
|
|
@@ -2510,8 +2502,6 @@ implementation
|
|
|
function tai_string.len: integer;
|
|
|
begin
|
|
|
Result:=Length(str);
|
|
|
- if Result>0 then
|
|
|
- Result:=Result-1;
|
|
|
end;
|
|
|
|
|
|
|