diff --git a/src/h1/xsk/decompiler.cpp b/src/h1/xsk/decompiler.cpp index 9b173989..e95d74e3 100644 --- a/src/h1/xsk/decompiler.cpp +++ b/src/h1/xsk/decompiler.cpp @@ -2376,6 +2376,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/h2/xsk/decompiler.cpp b/src/h2/xsk/decompiler.cpp index 3da9bb72..bdf4cda5 100644 --- a/src/h2/xsk/decompiler.cpp +++ b/src/h2/xsk/decompiler.cpp @@ -2376,6 +2376,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/iw5/xsk/decompiler.cpp b/src/iw5/xsk/decompiler.cpp index de786e09..a7147b22 100644 --- a/src/iw5/xsk/decompiler.cpp +++ b/src/iw5/xsk/decompiler.cpp @@ -2483,6 +2483,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/iw6/xsk/decompiler.cpp b/src/iw6/xsk/decompiler.cpp index 815e1bd2..38ffe6de 100644 --- a/src/iw6/xsk/decompiler.cpp +++ b/src/iw6/xsk/decompiler.cpp @@ -2370,6 +2370,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/iw7/xsk/decompiler.cpp b/src/iw7/xsk/decompiler.cpp index 314ab41a..301a9588 100644 --- a/src/iw7/xsk/decompiler.cpp +++ b/src/iw7/xsk/decompiler.cpp @@ -2370,6 +2370,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/iw8/xsk/decompiler.cpp b/src/iw8/xsk/decompiler.cpp index 68851a87..6398391e 100644 --- a/src/iw8/xsk/decompiler.cpp +++ b/src/iw8/xsk/decompiler.cpp @@ -2426,6 +2426,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/s1/xsk/decompiler.cpp b/src/s1/xsk/decompiler.cpp index 97e857b3..fd8eb510 100644 --- a/src/s1/xsk/decompiler.cpp +++ b/src/s1/xsk/decompiler.cpp @@ -2376,6 +2376,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/s2/xsk/decompiler.cpp b/src/s2/xsk/decompiler.cpp index 43b300a8..dc0b89a5 100644 --- a/src/s2/xsk/decompiler.cpp +++ b/src/s2/xsk/decompiler.cpp @@ -2385,6 +2385,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign) diff --git a/src/s4/xsk/decompiler.cpp b/src/s4/xsk/decompiler.cpp index 8b5c1472..7486ad6b 100644 --- a/src/s4/xsk/decompiler.cpp +++ b/src/s4/xsk/decompiler.cpp @@ -2426,6 +2426,8 @@ void decompiler::decompile_loop(const gsc::stmt_list_ptr& block, std::uint32_t s { if(start - index > 0) index++; + else + break; } if(block->stmts.at(start - index).as_node->type == gsc::node_t::stmt_assign)