aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-10-15 20:46:28 +0100
committerBen Harris <bjh21@bjh21.me.uk>2022-10-20 23:54:18 +0100
commite29d8a3ecad734967cdcf2d4ce222ab27e9c524b (patch)
treef452a6e7dafeab93f75c35e24ef58ae3ade09757 /pattern.c
parentdbbe9d37500219b61132266029c1d8f42378c01c (diff)
downloadpuzzles-e29d8a3ecad734967cdcf2d4ce222ab27e9c524b.zip
puzzles-e29d8a3ecad734967cdcf2d4ce222ab27e9c524b.tar.gz
puzzles-e29d8a3ecad734967cdcf2d4ce222ab27e9c524b.tar.bz2
puzzles-e29d8a3ecad734967cdcf2d4ce222ab27e9c524b.tar.xz
Add an assertion to check the format of encoded parameters
Whenever the midend calls encode_params, it also checks that the result is a printable ASCII string that doesn't contain '#' or ':'. Parameter strings are embedded in save files, so they have to fit within ASCII. They can't contain '#' or ':' because those delimit the parameter section of a game ID. Nothing explicitly says they can't contain control characters, but those would be a particularly egregious violation of the recommendation that parameter strings be easy to type into a shell.
Diffstat (limited to 'pattern.c')
0 files changed, 0 insertions, 0 deletions