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
Using double quotes in hammer causes VMF to become corrupt #60
Comments
This doesn't have much to do with instance params specifically, it's an issue with the BSP and VMF formats themselves - they don't parse |
Curious why this was closed, it could be fixed by adding handling to those areas. |
I would think a sanitizer for the inputs where it could cause corruption would be nice. Something to warn people that they shouldn't use double quotes maybe? |
@Gocnak Keep in mind that this corruption issue is already stated plenty of times in the Valve developer wiki. |
@FrozenDragon0 people who aren't aware of the issue or are and aren't paying attention while mapping can easily accidentally input a double quote and then waste an hour or two debugging a very mysterious crash. either avoiding the crash or at the least shoving an error dialogue in the user's face is much preferred to how source currently handles this. |
it does do this, it shows you a little error prompt, but it's vague, vmf's are text, and it'll tell you what line a error occurred, but: |
Reopening as this is something we can at least mitigate. |
Could we just fix this properly by adding support for |
This feature has been implemented and is now live on the staging branch. |
Describe the bug
using double quotes (") in the instance params causes the VMF file (when you're inserting the params in the func_instance_parms) to become corrupt upon saving. this is most likely due to VMF's using double quotes to incase strings, and saving them causes hammer to become confused. a fix for this is to replace any double quotes in any hammer entity IO with escape characters like \" or replace them entirely with single quotes (')
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The VMF file should become corrupt, the fix for this corruption (at least to me) is to either remove the entity manually or remove/replace the double quotes with something else.
Operating System (Optional: Only if OS Specific)
The text was updated successfully, but these errors were encountered: