Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hash mapping problem for either 0xA5236ECF or 0x1A154E32 when decompiling T7 scripts #260

@Hadi77KSA

Description

@Hadi77KSA

When decompiling T7 scripts which contain the hash 0xA5236ECF (which corresponds to the string spinpropkey) while having included an entry for it in the t7_hash.cpp file and built the program for Windows, the resulted string comes out as ghostindemo which corresponds to the hash 0x1A154E32. This occurs when the entry { 0x1A154E32, "ghostindemo" } is above that of the entry { 0xA5236ECF, "spinpropkey" } in the t7_hash.cpp file. When removing one of these entries, the output behaves as expected. When reversing the order of these entries, instead of the problem occurring to the hash 0xA5236ECF, it occurs to 0x1A154E32.

For example, assume a GSC script got compiled as this:

function func()
{
    self["0x1A154E32"] notify( "ghostindemo" );
    self["0xA5236ECF"] notify( "spinpropkey" );
}

When the order in t7_hash.cpp is this:

{ 0x1A154E32, "ghostindemo" },
{ 0xA5236ECF, "spinpropkey" },

the decompiled output is as follows:

function func()
{
    self["0x1A154E32"] notify( #"ghostindemo" );
    self["0xA5236ECF"] notify( #"ghostindemo" );
}

However, when reversing the order of entries to be this:

{ 0xA5236ECF, "spinpropkey" },
{ 0x1A154E32, "ghostindemo" },

the output becomes as follows:

function func()
{
    self["0x1A154E32"] notify( #"spinpropkey" );
    self["0xA5236ECF"] notify( #"spinpropkey" );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions