|
@@ -311,7 +311,6 @@ end;
|
|
function TVersionResource.ReadWideString(toread: integer): string;
|
|
function TVersionResource.ReadWideString(toread: integer): string;
|
|
var w : word;
|
|
var w : word;
|
|
ws : widestring;
|
|
ws : widestring;
|
|
- i: integer = 0;
|
|
|
|
begin
|
|
begin
|
|
ws:='';
|
|
ws:='';
|
|
if toread=0 then
|
|
if toread=0 then
|
|
@@ -319,17 +318,13 @@ begin
|
|
w:=0;
|
|
w:=0;
|
|
repeat
|
|
repeat
|
|
RawData.ReadBuffer(w,2);
|
|
RawData.ReadBuffer(w,2);
|
|
- if (toread=-1) and (w = 0) then break;
|
|
|
|
|
|
+ if (w = 0) then break;
|
|
{$IFDEF ENDIAN_BIG}
|
|
{$IFDEF ENDIAN_BIG}
|
|
w:=SwapEndian(w);
|
|
w:=SwapEndian(w);
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
ws:=ws+widechar(w);
|
|
ws:=ws+widechar(w);
|
|
- inc(i);
|
|
|
|
- until i = toread;
|
|
|
|
|
|
+ until false;
|
|
Result:=ws;
|
|
Result:=ws;
|
|
- // last #0 should be excluded (#0 is implicitly added for string)
|
|
|
|
- if (toread<>-1) and (Result[i] = #0) then
|
|
|
|
- SetLength(Result, i-1);
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TVersionResource.WriteFixedBlockLength(const position: int64);
|
|
procedure TVersionResource.WriteFixedBlockLength(const position: int64);
|