summaryrefslogtreecommitdiff
path: root/src/format/elf/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/elf/elf.c')
-rw-r--r--src/format/elf/elf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c
index d09b845..7ea9417 100644
--- a/src/format/elf/elf.c
+++ b/src/format/elf/elf.c
@@ -243,10 +243,13 @@ static void g_elf_format_finalize(GElfFormat *format)
GBinFormat *g_elf_format_new(GBinContent *content, GExeFormat *parent, GtkStatusStack *status)
{
GElfFormat *result; /* Structure à retourner */
+ GBinFormat *base; /* Version basique du format */
result = g_object_new(G_TYPE_ELF_FORMAT, NULL);
- g_binary_format_set_content(G_BIN_FORMAT(result), content);
+ base = G_BIN_FORMAT(result);
+
+ g_binary_format_set_content(base, content);
if (!read_elf_header(result, &result->header, &result->is_32b, &result->endian))
{
@@ -302,10 +305,10 @@ GBinFormat *g_elf_format_new(GBinContent *content, GExeFormat *parent, GtkStatus
}
- if (!g_binary_format_complete_loading(G_BIN_FORMAT(result)))
+ if (!g_binary_format_complete_loading(base, status))
goto gefn_error;
- return G_BIN_FORMAT(result);
+ return base;
gefn_error: