diff options
Diffstat (limited to 'src/arch/instruction.c')
| -rw-r--r-- | src/arch/instruction.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 1af3b97..e199dc5 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -45,7 +45,7 @@  *                                                                             *  ******************************************************************************/ -asm_instr *create_db_instruction(const char *data, off_t *pos, off_t len) +asm_instr *create_db_instruction(const uint8_t *data, off_t *pos, off_t len)  {      asm_instr *result;                      /* Représentation à renvoyer   */ @@ -54,7 +54,9 @@ asm_instr *create_db_instruction(const char *data, off_t *pos, off_t len)      result->opcode = DB_OPCODE;      /* TODO: check result */ -    fill_db_operand(&result->operands[0], data[(*pos)++]); +    result->operands = (asm_operand **)calloc(1, sizeof(asm_operand *)); +    result->operands[0] = (asm_operand *)calloc(1, sizeof(asm_operand)); +    fill_db_operand(result->operands[0], data[(*pos)++]);      result->operands_count = 1; | 
