This issue is not critical. The workaround is simple: make the entry with an empty string not first.
Steps to reproduce:
- Load option-string-empty-string.pk3.
- Open Options menu. There are two option fields on the bottom: "This works" and "This doesn't work".
Expected result: the value in "This doesn't work" option is either "empty" or "text".
Actual result: the value is "Unknown". - Change value of "This doesn't work" option.
Expected result: the value switches between "empty" and "text", CVar value switches between "" and "text".
Actual result: the value remains "Unknown", CVar value becomes "INF". The displayed text on "This works" option becomes "Unknown" too.
menudef.txt:
Code: Select all
OptionString this_works
{
"text" , "text"
"" , "empty"
}
OptionString this_does_not_work
{
"" , "empty"
"text" , "text"
}
AddOptionMenu OptionsMenu
{
Option "This works" , bug_empty_string, this_works
Option "This doesn't work" , bug_empty_string, this_does_not_work
}
Code: Select all
user string bug_empty_string = "text";