Skip to content

Fix MercAffectData.type default: --1 evaluated to +1 - #13

Open
ctoth wants to merge 1 commit into
masterfrom
fix/merc-affect-type-default
Open

Fix MercAffectData.type default: --1 evaluated to +1#13
ctoth wants to merge 1 commit into
masterfrom
fix/merc-affect-type-default

Conversation

@ctoth

@ctoth ctoth commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Fixes #6.

MercAffectData.type was declared with default=--1 — a double unary minus that evaluates to +1 — while every sibling field uses -1. One-character fix: default=-1.

Verified on this branch:

$ python -c "from area_reader import MercAffectData; print(MercAffectData().type, MercAffectData().duration)"
-1 -1

(was 1 -1 before the fix)

Full test suite: 719 passed.

The double unary minus made the default +1 instead of the intended -1
used by every sibling field.

Fixes #6

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018c1X1pogRiyCxdBNHQRMEg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MercAffectData.type default is +1 due to double negative (--1)

1 participant