Author: tkreuzer
Date: Mon Dec 8 07:42:25 2008
New Revision: 37937
URL:
http://svn.reactos.org/svn/reactos?rev=37937&view=rev
Log:
update rsym from trunk
Modified:
branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c
Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c [iso-8859-1] Mon Dec 8 07:42:25
2008
@@ -697,19 +697,23 @@
Length = StartOfRawData;
for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++)
{
+ DWORD SizeOfRawData;
if (OutRelocSection == OutSectionHeaders + Section)
{
Data = (void *) ProcessedRelocs;
+ SizeOfRawData = ProcessedRelocsLength;
}
else if (RosSymLength > 0 && Section + 1 ==
OutFileHeader->NumberOfSections)
{
Data = (void *) PaddedRosSym;
+ SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData;
}
else
{
Data = (void *) ((char *) InData +
OutSectionHeaders[Section].PointerToRawData);
- }
- for (i = 0; i < OutSectionHeaders[Section].SizeOfRawData / 2; i++)
+ SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData;
+ }
+ for (i = 0; i < SizeOfRawData / 2; i++)
{
CheckSum += ((unsigned short*) Data)[i];
CheckSum = 0xffff & (CheckSum + (CheckSum >> 16));
@@ -730,21 +734,24 @@
{
if (0 != OutSectionHeaders[Section].SizeOfRawData)
{
+ DWORD SizeOfRawData;
fseek(OutFile, OutSectionHeaders[Section].PointerToRawData, SEEK_SET);
if (OutRelocSection == OutSectionHeaders + Section)
{
Data = (void *) ProcessedRelocs;
+ SizeOfRawData = ProcessedRelocsLength;
}
else if (RosSymLength > 0 && Section + 1 ==
OutFileHeader->NumberOfSections)
{
Data = (void *) PaddedRosSym;
+ SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData;
}
else
{
Data = (void *) ((char *) InData +
OutSectionHeaders[Section].PointerToRawData);
- }
- if (fwrite(Data, 1, OutSectionHeaders[Section].SizeOfRawData, OutFile) !=
- OutSectionHeaders[Section].SizeOfRawData)
+ SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData;
+ }
+ if (fwrite(Data, 1, SizeOfRawData, OutFile) != SizeOfRawData)
{
perror("Error writing section data\n");
free(PaddedRosSym);