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

Make sure starlark dict key string has prefix and suffix #1156

Merged
merged 4 commits into from
Jul 23, 2021

Conversation

clayscode
Copy link
Contributor

No description provided.

@clayscode clayscode changed the title Make sure string has prefix and suffix Make sure starlark dict key string has prefix and suffix Jul 22, 2021
@scudette
Copy link
Contributor

I'm not sure what this is for? Can you please add a test to show what the issue is?

@clayscode
Copy link
Contributor Author

So the issue is that keys that are strings return extra quotes. {"A": 1} returns ""A"" as a key, requiring you to access it like "A". So I just decided to strip that off. However, integers don't, so 123 gets set as 2, and just 1 causes a panic due to the string being too short. Hence the check if the key is prefixed and suffixed with quotes.

@scudette scudette merged commit 28b061b into Velocidex:master Jul 23, 2021
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