Skip to content

Fix input validation in identify3d and subscenes - #508

Merged
dmurdoch merged 1 commit into
dmurdoch:masterfrom
sims1253:fix-identify3d-subscene-validation
Jul 15, 2026
Merged

dmurdoch merged 1 commit into
dmurdoch:masterfrom
sims1253:fix-identify3d-subscene-validation

Conversation

@sims1253

Copy link
Copy Markdown
Contributor
  • length(buttons > 1) should be length(buttons) > 1; as written it is always >= 1 (truthy), so the else-branch is dead and a single-button call prints "the NA button to quit".
  • In the dead else-branch, buttons[1] is a second argument to cat, not to gettextf, so even when fixed it would print the literal %s.
  • After pmatch, embeddings is integer; 2L == "modify" coerces to "2" == "modify", always FALSE, so the prohibition on a "modify" mouse embedding is never enforced.

Found with https://github.com/sims1253/ry :)

@dmurdoch

Copy link
Copy Markdown
Owner

Thanks, those all look like good fixes. I'll accept after testing...

@dmurdoch
dmurdoch merged commit 95d44a9 into dmurdoch:master Jul 15, 2026
5 checks passed
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.

2 participants