Fixed fatelf-glue writing records with zero offset.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 25 Oct 2009 12:42:46 -0400
changeset 106 e8010ae51530
parent 105 76ada92e018a
child 107 cb7f86de285b
Fixed fatelf-glue writing records with zero offset.

Fixes regression introduced by changeset 101:0087a1620fbe.
utils/fatelf-glue.c
--- a/utils/fatelf-glue.c	Sat Oct 24 03:23:53 2009 -0400
+++ b/utils/fatelf-glue.c	Sun Oct 25 12:42:46 2009 -0400
@@ -39,8 +39,8 @@
         const int fd = xopen(fname, O_RDONLY, 0755);
         FATELF_record *record = &header->records[i];
 
+        xread_elf_header(fname, fd, 0, record);
         record->offset = binary_offset;
-        xread_elf_header(fname, fd, 0, record);
 
         // make sure we don't have a duplicate target.
         for (j = 0; j < i; j++)