Skip to content

Commit

Permalink
Merge branch 'asar_19' into asar_2_beta
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Jan 27, 2024
2 parents 6619e38 + 7771f67 commit d5963c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/asar/arch-spc700.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,18 @@ bool asblock_spc700(char** word, int numwords)
write2(((unsigned int)bits<<13)|num);
return true;
}
int pos = (getnum_ck(arg[1])- (unsigned int)(snespos)-3);
if (pass==2 && (pos<-128 || pos>127)) {
asar_throw_error(1, error_type_block, error_id_relative_branch_out_of_bounds, dec(pos).data());
}
if(0);
else if (isop("bbs")) write1((unsigned int)(0x03|(bits<<5)));
else if (isop("bbc")) write1((unsigned int)(0x13|(bits<<5)));
else return false;
unsigned int num=getnum_ck(s1);
if (num>=0x100) asar_throw_error(2, error_type_block, error_id_snes_address_out_of_bounds, hex(num, 6).data());
write1(num);
write1((getnum_ck(arg[1])- (unsigned int)(snespos+1)));
write1(pos);
return true;
}
#undef isop
Expand Down

0 comments on commit d5963c6

Please sign in to comment.