News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Comment correct in common_functions.script?

Started by ollydbg, April 07, 2013, 05:03:08 AM

Previous topic - Next topic

ollydbg

In trunk\src\plugins\scriptedwizard\resources\common_functions.script


function VerifyMacro(macro)
{
    // try to make it a real path and verify it's existence
    local dir = ReplaceMacros(macro, true);

    // verify if there are macros used at all...
    if (macro.Matches(dir))
    {
        return (_T("")); // no macros used -> return empty
    }

    return dir;
}

I think "try to make it a real path and verify it's existence" is not correct, this function just try to expand macro, than compare whether the original string and the expanded string are the same. This means it try to see whether a string have macro usages in it.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.