Skip to content

[Bug] Text-to-Morse main loop has a duplicated handler block — prompts twice per menu #1869

Description

@vedant7007

Problem (Med — broken interactive flow)

utilities/Text-to-Morse/Text-to-Morse.py:158-256 is a duplicate of :105-155. The main() while-loop body contains two full copies of the choice handler: each iteration prints the menu once, runs one prompt+handler (105-155), then immediately runs a second prompt+handler (158+) with no menu reprinted, before looping. The user is forced through two selections per menu display. (The first copy silently drops unsupported chars; the second marks them ?.)

This is a copy-paste/merge artifact, matching the repo's existing duplicate-block pattern (#1858, #1863).

Suggested fix (small)

Delete the duplicated second block (~158-256), keeping the more complete handler.

Happy to fix under GSSoC '26 if assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions