If the first value in OptionString is empty, INF is assigned

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Posts: 1433
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

If the first value in OptionString is empty, INF is assigned

Post by m8f »

If the first value in OptionString pair list is an empty string (""), Option entry with this OptionString displays "Unknown" and assigns "INF" to a corresponding CVar.

This issue is not critical. The workaround is simple: make the entry with an empty string not first.

Steps to reproduce:
  1. Load option-string-empty-string.pk3.
  2. 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".
  3. 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.
The contents of option-string-empty-string.pk3:

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";
Edit: GZDoom 4.4.2.
You do not have the required permissions to view the files attached to this post.

Return to “Bugs [GZDoom]”