diff --git a/src/app/career_session.cpp b/src/app/career_session.cpp index 0065576..6a0573c 100644 --- a/src/app/career_session.cpp +++ b/src/app/career_session.cpp @@ -768,6 +768,9 @@ bool CareerSession::commit_manager_join(ui::CareerInitializationResult& result, // ConfirmManager retains the current desk/cursor. Weiter performs the later handoff. const auto next_revision = revision + 1; turn_driver_.revision = next_revision; + // The next opponent of every manager is captured per day for the manager count of that day; + // the joined manager has only the default ("no game") until it is captured again. + capture_source_desk_callargs(); ui::CareerInitializationResult next; next.desktop = desktop_projection(next_revision); next.managers = managers_; next.preparation = preparation_projection(next_revision); diff --git a/src/ui/club_player_detail.cpp b/src/ui/club_player_detail.cpp index aa91b44..b5ac4a4 100644 --- a/src/ui/club_player_detail.cpp +++ b/src/ui/club_player_detail.cpp @@ -15,7 +15,9 @@ void rect(Image& out,int x,int y,int w,int h,uint8_t c) { for(int xx=std::max(0,x);xxsrc.width||sy+h>src.height)throw FormatError("player card: original atlas bounds"); + if(sx<0||sy<0||sx+w>src.width||sy+h>src.height) + throw FormatError("club player detail: original atlas bounds "+std::to_string(sx)+","+std::to_string(sy)+ + ":"+std::to_string(w)+"x"+std::to_string(h)+" in "+std::to_string(src.width)+"x"+std::to_string(src.height)); for(int yy=0;yy=0&&x+xx=0&&y+yy