chiark / gitweb /
Change the policy for parsing underspecified params strings.
authorSimon Tatham <anakin@pobox.com>
Sat, 29 Nov 2014 10:23:12 +0000 (10:23 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 29 Nov 2014 10:23:12 +0000 (10:23 +0000)
commitf781937d0dd435fc24e13c117d38e530b4351d06
tree06ef14813d983e6fabdea63558c6224ec1ce2f07
parent078d3c0a6d6ace0f524dea0c3e03d5fa9ba361c0
Change the policy for parsing underspecified params strings.

In conversation with a user last week, it emerged that the command
'solo --generate 1 9jk#12345' was giving a different game from the one
it gave when I ran it, and it turns out that this is because I've set
SOLO_DEFAULT=7jxdi in my environment to make GUI Solo automatically
start up in my (current) favourite mode. And the difficulty setting
from that parameter string was being reused to fill in the unspecified
difficulty slot in the '9jk', so that the same params string was being
interpreted differently by our two machines.

This is certainly wrong - the whole point of random seed strings like
that is to be interpreted the same way everywhere. But it's a side
effect of something I did do on purpose, for people switching back and
forth between playing randomly generated games and playing a game id
pasted (or typed) in from elsewhere. So this fix, with a giant comment
explaining it, I _think_ should retain the behaviour I originally
wanted while getting rid of the behaviour I didn't.
midend.c