Skip to content

Avoid creating an empty if block #83

Closed
@rfalke

Description

Version: web version at https://retdec.com/service/api
File: https://github.com/rfalke/decompiler-subjects/tree/master/from_holdec/condition_structure/ia32_elf
Output:

// Address range: 0x8048437 - 0x8048465
int32_t test_1_blocks_1_targets_direct_variant_0(void) {
    // 0x8048437
    if (g2 == 0) {
        // 0x8048437
        // branch -> 0x8048439
    } else {
        // 0x8048457
        puts("then/else block 3");
        // branch -> 0x8048439
    }
    // 0x8048439
    puts("return block");
    return 0;
}

Expected:

The condition should be inverted and there should only be the then-block without else.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions