Closed ghost closed 7 months ago
https://github.com/RPGHacker/asar/blob/master/src/asar/arch-spc700.cpp#L366 affected line, bbs1/bbc1 are branch commands depending on the bit and can only support ranges up to 128
bad hotfix: int len = getlen(arg[1]); int ddss = (int)getnum64(arg[1]); int pos = (len == 1) ? ddss : ddss - (snespos + 1); if (pass && foundlabel && (pos < -128 || pos>127)) asar_throw_error(2, error_type_block, error_id_relative_branch_out_of_bounds, dec(pos).data()); write1((unsigned int)pos);
int len = getlen(arg[1]); int ddss = (int)getnum64(arg[1]); int pos = (len == 1) ? ddss : ddss - (snespos + 1); if (pass && foundlabel && (pos < -128 || pos>127)) asar_throw_error(2, error_type_block, error_id_relative_branch_out_of_bounds, dec(pos).data()); write1((unsigned int)pos);
Duplicate of #219.
https://github.com/RPGHacker/asar/blob/master/src/asar/arch-spc700.cpp#L366 affected line, bbs1/bbc1 are branch commands depending on the bit and can only support ranges up to 128
bad hotfix:
int len = getlen(arg[1]); int ddss = (int)getnum64(arg[1]); int pos = (len == 1) ? ddss : ddss - (snespos + 1); if (pass && foundlabel && (pos < -128 || pos>127)) asar_throw_error(2, error_type_block, error_id_relative_branch_out_of_bounds, dec(pos).data()); write1((unsigned int)pos);