Changeset 1285 in svn for trunk/bin/phpdc.phpr


Ignore:
Timestamp:
2013-07-10T07:13:14Z (2 years ago)
Author:
Xuefer
Message:

phpdc: exit on decompile error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/phpdc.phpr

    r982 r1285  
    1515$dc = new Decompiler();
    1616if (isset($argv[2])) {
    17     eval('$dc->dc = ' . file_get_contents($argv[2]) . ';');
     17    eval('$dc->decompileDasm(' . file_get_contents($argv[2]) . ');');
    1818}
    1919else if (isset($argv[1])) {
    20     $dc->decompileFile($argv[1]);
     20    if ($dc->decompileFile($argv[1]) === false) {
     21        exit(2);
     22    }
    2123}
    2224else {
     
    2830        $phpcode .= fgets(stdin);
    2931    }
    30     $dc->decompileString($phpcode);
     32    if ($dc->decompileString($phpcode) === false) {
     33        exit(2);
     34    }
    3135}
    3236$dc->output();
Note: See TracChangeset for help on using the changeset viewer.