summaryrefslogtreecommitdiff
path: root/packages/fcl-res
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-02-15 14:15:54 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-02-15 14:15:54 +0000
commitb3734343e6f8093cba4f5fad18ca2c506656e018 (patch)
treee273ca1825c17c2b00a3d5418c66142b3877f769 /packages/fcl-res
parentd52cf74e34d1053c193108f98358743d88218578 (diff)
downloadfpc-b3734343e6f8093cba4f5fad18ca2c506656e018.tar.gz
* patches from Paul for mantis 15716, readwidestring #0 issue + warning removal
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@14917 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-res')
-rw-r--r--packages/fcl-res/src/elfsubreader.inc6
-rw-r--r--packages/fcl-res/src/elfsubwriter.inc4
-rw-r--r--packages/fcl-res/src/machosubreader.inc4
-rw-r--r--packages/fcl-res/src/versionresource.pp3
4 files changed, 9 insertions, 8 deletions
diff --git a/packages/fcl-res/src/elfsubreader.inc b/packages/fcl-res/src/elfsubreader.inc
index d4e189d5a2..58a15fa1ab 100644
--- a/packages/fcl-res/src/elfsubreader.inc
+++ b/packages/fcl-res/src/elfsubreader.inc
@@ -55,13 +55,13 @@ type
procedure ReadElfHeader(aStream : TStream);
procedure ReadSectionHeaders(aStream : TStream);
procedure ReadStringTable(aStream : TStream);
- function FindSection(const aName : string) : integer; override;
procedure ReadRelocations(aStream : TStream);
procedure ReadResHeader(aStream : TStream);
- procedure ReadNode(aStream : TStream; aParent : TResourceTreeNode;
- aResources : TResources; named : boolean); override;
protected
+ function FindSection(const aName : string) : integer; override;
procedure Load(aResources : TResources; aStream : TStream); override;
+ procedure ReadNode(aStream : TStream; aParent : TResourceTreeNode;
+ aResources : TResources; named : boolean); override;
public
end;
diff --git a/packages/fcl-res/src/elfsubwriter.inc b/packages/fcl-res/src/elfsubwriter.inc
index cf42ae5a1d..1fb004abec 100644
--- a/packages/fcl-res/src/elfsubwriter.inc
+++ b/packages/fcl-res/src/elfsubwriter.inc
@@ -63,17 +63,17 @@ type
private
fRelocInfo : TElfRelocInfo;
fRelocTable : _TElfRelocTable_;
- procedure PrescanResourceTree; override;
procedure WriteEmptyElfHeader(aStream : TStream);
procedure WriteResHeader(aStream : TStream; aResources : TResources);
procedure WriteNodeInfos(aStream : TStream);
- procedure WriteNodeInfo(aStream : TStream; aNode : TResourceTreeNode); override;
procedure WriteSectHeaders(aStream : TStream);
procedure FixElfHeader(aStream : TStream);
procedure WriteSymbols(aStream : TStream);
procedure WriteRelocations(aStream : TStream);
protected
+ procedure PrescanResourceTree; override;
procedure Write(aResources : TResources; aStream : TStream); override;
+ procedure WriteNodeInfo(aStream : TStream; aNode : TResourceTreeNode); override;
public
constructor Create(aParent : TElfResourceWriter; const aMachineType
: integer; const aOppositeEndianess : boolean); override;
diff --git a/packages/fcl-res/src/machosubreader.inc b/packages/fcl-res/src/machosubreader.inc
index c1f9d64ad1..a6925db088 100644
--- a/packages/fcl-res/src/machosubreader.inc
+++ b/packages/fcl-res/src/machosubreader.inc
@@ -21,12 +21,12 @@ type
private
fSection : _TSection_;
fResHdr : _TResHdr_;
- procedure ReadNode(aStream : TStream; aParent : TResourceTreeNode;
- aResources : TResources; named : boolean); override;
function FindResSection(aStream : TStream) : boolean;
procedure ReadResHeader(aStream : TStream);
protected
procedure Load(aResources : TResources; aStream : TStream); override;
+ procedure ReadNode(aStream : TStream; aParent : TResourceTreeNode;
+ aResources : TResources; named : boolean); override;
public
constructor Create(aParent : TMachOResourceReader; const aHeader : TMachHdr;
const aOppositeEndianess : boolean); override;
diff --git a/packages/fcl-res/src/versionresource.pp b/packages/fcl-res/src/versionresource.pp
index 5ed637a26b..353b3a3e47 100644
--- a/packages/fcl-res/src/versionresource.pp
+++ b/packages/fcl-res/src/versionresource.pp
@@ -310,11 +310,12 @@ begin
w:=0;
repeat
RawData.ReadBuffer(w,2);
+ if w = 0 then break;
{$IFDEF ENDIAN_BIG}
w:=SwapEndian(w);
{$ENDIF}
ws:=ws+widechar(w);
- until w=0;
+ until false;
Result:=ws;
end;