Skip to content

Expanding baton in a too small pocket and then saving and reloading the save results in an error #86743

@Festerdam

Description

@Festerdam

Describe the bug

In the 0.I release candidate, if I store an unextended baton in a pocket and then expand it within that pocket such that it now has a length that surpasses the pocket's max length limit and then immediately save and exit the game without first walking, the next time that save is loaded, the following error occurs on load:

 DEBUG : error: item baton-extended cannot fit into pocket while loading: item is too long

 REPORTING FUNCTION : void item_contents::combine(const item_contents&, bool, bool, bool, bool)
 C++ SOURCE FILE    : src/item_contents.cpp
 LINE               : 737
 VERSION            : cdda-0.I-2026-04-15-1311 46730b6

Once in the game, one will note that the baton is gone from the inventory. However, as soon as the character moves or waits, the baton drops to the floor and is therefore not lost.

Attach save file

test-world-trimmed.tar.gz

Steps to reproduce

  1. Get a pocket that is able to contain an unextended baton and has a max length limit below the extended baton's length (60 cm) and an unextended baton and insert it in the pocket.
  2. Activate the baton within that pocket (start here if using the attached save)
  3. Do not move. Save and exit
  4. Reload the save
  5. Error occurs.

Expected behavior

I expect the game to not allow the player to extend a baton within a pocket within which its extended variant does not fit.

Screenshots

No response

Versions and configuration

  • OS: Fedora Linux 42 (Workstation Edition)
  • Game Version: cdda-0.I-2026-04-15-1311 46730b6 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms]
    ]

Additional context

debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    (S1 - Need confirmation)Report waiting on confirmation of reproducibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions