Skip to content

Conversation

@tsh-hashimoto
Copy link
Contributor

#747 でCobolDataStorage型の変数の出力をするときに、base_cacheを出力するところのif文を修正したが、b_RETURN_CODE が2回出力されてしまうようになっていたので、1回のみ出力されるように修正した。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a duplicate output bug introduced in PR #747 where b_RETURN_CODE and potentially other CobolDataStorage variables were being output twice during initialization. The fix adds a continue statement to prevent fall-through execution after handling the "new program" case in the base_cache loop.

  • Added continue statement to prevent duplicate processing when outputting CobolDataStorage variables for a new PROGRAM-ID
  • Added free(base_name) and comment output before the continue to match the pattern used in the fall-through path
  • Prevents both duplicate output and a potential double-free memory bug

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tsh-hashimoto tsh-hashimoto marked this pull request as ready for review November 20, 2025 08:05
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.

1 participant