-
Notifications
You must be signed in to change notification settings - Fork 47
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
Filter input during hero creation #50
Comments
I'm rephrasing this ticket as there could be some problems when creating non-standard heroes. Let's say I want to create a hero with name ../Modsognir, it will rewrite an existing Modsognir hero. Luckily it's not possible to rewrite savegames as delimiters like \n doesn't seem to work in user input. Another thing is that when you create an inappropriate hero with name e.g. //\yCoolHero, its' profile won't be created and it will be accessible only during this launch. |
You are right, those are serious concerns. Thanks for bringing this up! I've fixed the issue now, and also made the check which sees whether another hero of the same name exists case-insensitive (since Windows cannot have two files with the same name even if they are written with letters in different cases). I've also added a check to see if the name has only spaces in it. |
Is it ok that hero can have empty name with space in it and valid surname? Usually name is required, surname is optional. Other cases seem to be covered now. |
Now that you mention it, that shouldn't be possible, thanks for letting me know. I've fixed it now: |
Well, I'm still not satisfied. ;) |
Ops, I forgot to upload the corresponding Wyrmsun repository commit: |
It's possible to create custom hero with just spaces, so it looks odd with no name and surname. I suggest trimming spaces or doing a simple check.
The text was updated successfully, but these errors were encountered: