-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingmodernizationIssues related to C code modernizationIssues related to C code modernization
Description
Priority: MEDIUM
File: Src/selectG.c
Function: goto_cvn()
Discovered: During Phase 4 documentation of selectG.c
Description: Function incorrectly compares YREAL with c1_ptr->xloc when it should compare XREAL with xloc. This is a logic error in coordinate validation that could cause incorrect caravan navigation behavior.
Reproduction Steps:
- Navigate to a caravan using goto_cvn()
- Function checks
if (YREAL != c1_ptr->xloc)at line 1012 - Expected: Should check
if (XREAL != c1_ptr->xloc)for X-coordinate validation - Bug causes incorrect coordinate comparison (Y vs X mismatch)
Impact: Navigation to caravans may work incorrectly when caravan X-coordinate differs from current Y-coordinate, potentially causing navigation failures or unexpected map positioning.
Proposed Fix: Change the coordinate comparison to match X with X:
/* Before (buggy) */
if (YREAL != c1_ptr->xloc) {
/* After (fixed) */
if (XREAL != c1_ptr->xloc) {Original Bug ID: BUG-003
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmodernizationIssues related to C code modernizationIssues related to C code modernization