Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyprctl: avoid parsing string::npos on invalid cmd #7544

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

gulafaran
Copy link
Contributor

invalid lines passed to hyprctl keyword made the string parsing try to parse std::string::npos, avoid that and return an error text instead.

caused it to return garbled output etc when giving it invalid lines.

Fixes: #7424

invalid lines passed to hyprctl keyword made the string parsing try to
parse std::string::npos, avoid that and return an error text instead.
@gulafaran
Copy link
Contributor Author

are there keywords that can be called without a value provided etc? as im checking now it returns a fail message if no value is parsed.

vaxerski
vaxerski previously approved these changes Aug 27, 2024
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

lgtm, I'll fix the {} myself cuz I know you are gone for a few days

@vaxerski
Copy link
Member

are there keywords that can be called without a value provided etc? as im checking now it returns a fail message if no value is parsed.

doesn't make sense, no

@vaxerski vaxerski merged commit 17ed4fc into hyprwm:main Aug 27, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting a keyword with an empty name prints garbage data to the console
2 participants