[Scummvm-cvs-logs] SF.net SVN: scummvm:[51629] tools/branches/gsoc2010-decompiler/decompiler/ control_flow.cpp
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Mon Aug 2 19:04:14 CEST 2010
Revision: 51629
http://scummvm.svn.sourceforge.net/scummvm/?rev=51629&view=rev
Author: pidgeot
Date: 2010-08-02 17:04:14 +0000 (Mon, 02 Aug 2010)
Log Message:
-----------
Minor fix to else detection
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp
Modified: tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp 2010-08-02 16:38:48 UTC (rev 51628)
+++ tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp 2010-08-02 17:04:14 UTC (rev 51629)
@@ -427,6 +427,7 @@
}
bool ControlFlow::validateElseBlock(GroupPtr ifGroup, GroupPtr start, GroupPtr end) {
+ std::cerr << boost::format("Validating else blockfor 0x%08X: 0x%08X to 0x%08X\n") % ifGroup->_start->_address % start->_start->_address % end->_start->_address;
for (GroupPtr cursor = start; cursor != end; cursor = cursor->_next) {
if (cursor->_type == kIfCond || cursor->_type == kWhileCond || cursor->_type == kDoWhileCond) {
// Validate outgoing edges of conditions
@@ -440,8 +441,8 @@
}
}
- // If group ends an else, that else must start inside the range
- for(ElseEndIterator it = cursor->_endElse.begin(); it != cursor->_endElse.end(); ++it)
+ // If previous group ends an else, that else must start inside the range
+ for (ElseEndIterator it = cursor->_prev->_endElse.begin(); it != cursor->_prev->_endElse.end(); ++it)
{
if ((*it)->_start->_address < start->_start->_address)
return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list