From 16ae7df7f8f7d2694e9f9a01f2c311c2576f3cd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 10:10:34 +0100 Subject: [PATCH] Joined manager sees his next opponent; club detail error names the access - Joining a manager: the next opponent of every manager is captured per day for that day's manager count, so the joined manager's desk showed "Spielfrei" until the next day was prepared. It is captured again when the join is committed. - The club player detail's atlas error now names the access and the atlas size, so the debug log shows what failed. Refs #76, #77. Co-Authored-By: Claude Sonnet 5.5 --- src/app/career_session.cpp | 3 +++ src/ui/club_player_detail.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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