summaryrefslogtreecommitdiff
path: root/src/format/executable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/executable.c')
-rw-r--r--src/format/executable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/format/executable.c b/src/format/executable.c
index 1a66ffc..ab5543a 100644
--- a/src/format/executable.c
+++ b/src/format/executable.c
@@ -124,13 +124,16 @@ const char *g_exe_format_get_target_machine(const GExeFormat *format)
GBinPortion *g_exe_format_get_portions(GExeFormat *format)
{
vmpa2t addr; /* Emplacement vide de sens */
+ phys_t length; /* Taille de portion globale */
if (format->portions == NULL)
{
format->portions = g_binary_portion_new(BPC_RAW);
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- g_binary_portion_set_values(format->portions, &addr, G_BIN_FORMAT(format)->length);
+ length = g_binary_content_compute_size(G_BIN_FORMAT(format)->content);
+
+ g_binary_portion_set_values(format->portions, &addr, length);
if (format->refine_portions != NULL)
format->refine_portions(format, format->portions);