extractSessionVariables misses $SESSION_* references inside string literals

Open Beginner friendly
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
tooling

Research direction

Start by reading extractSessionVariables() in src/script_utils.cpp at lines 30–36 and reproduce the reported call with a $SESSION_USERNAME reference inside a quoted string. Done looks like references in strings are collected as well as bare variable tokens, so the Connect dialog can show the input field.

Written by the indexing model from the issue text.

Description

bug
Summary

extractSessionVariables() only collects VARIABLE tokens. The documented usage TYPE "$SESSION_USERNAME" puts the reference inside a string, so it is not found; 5250ng's Connect dialog then shows no input field for it and the startup script types 0.

Location
  • File(s): src/script_utils.cpp
  • Line(s) / function(s): L30–L36
Category

functional

Severity

medium

Reproduction / Evidence

Reproducible at runtime: extractSessionVariables("TYPE \"$SESSION_USERNAME\"\nPRESS ENTER") returns {}.

Expected Behavior

References inside interpolated strings are collected too.

Actual Behavior

Only bare variable tokens are collected.

Root Cause

String tokens are not scanned for $NAME patterns.

Dominant language
C++
Stars
1
Forks
2
Avg merge
1h 34m
Merged PRs (30d)
7

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 5250ng/5250script

All issues in 5250ng/5250script

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.