risk of crashing if someone edits the file incorrectly
If the configuration is invalid, then it should not work. You should verify if the data on the file is valid (e.g., It has all the fields, it does not have letters where numbers are expected, etc...) and either notify the user, load default settings or whatever is appropriate for your game.
so what is a better way of loading this data?
If you want the user to be able to edit the configuration file by hand - and you do not want to worry about parsing the file - you should be using some well-known format.
Consider to use INI, JSON, YAML, XML or similar. There are libraries that will handle loading the file for you.
Which one to use is opinion based. You will have to pick considering, for example:
- Is there a library available your language and platform?
- How hard will it be to edit configuration by hand?
- How hard is to handle versioning the settings (e.g. loading a configuration file from an old version of the software that used different fields)?
- How fast is to parse the file?
- How easy is to validate the data types of the fields?
- How resilient is the format to corruption?
Alternatively, any other criteria relevant to your case.
If using a well-known format does not work for you, you could create a proprietary tool to edit the configuration file and use a binary format. It will read faster and will discourage messing with the file directly.