Page 1 of 1

[bug] empty string tests as not empty in 7.4.7, 7.4.8

Posted: Tue Aug 03, 2021 10:49 pm
by jeffster
This is a screenshot of two textbuttons and an input in between:
nonempty.png
nonempty.png (4.41 KiB) Viewed 4193 times
The input field is an empty string. The textbuttons' labels should both say "empty", as the input variable is empty.

Here is the code. If it's run from "Reload the script", then the bug doesn't appear, but if you return to Main menu and run it, the bug is there. It didn't happen in 7.4.6-.

Code: Select all

default empty = ""
default empty_input = VariableInputValue(variable = "empty", returnable = True)

label start:
    call screen test_default()
    return

screen test_default():
    vbox:
        if empty == "":
            $ if_empty = "Empty"
            textbutton "[if_empty]" action Return()
        else:
            $ if_empty = "Not empty"
            textbutton "[if_empty]" action Return()

        frame background "#369":
            input value empty_input

        textbutton "[if_empty]" action Return()

Re: [bug] empty string tests as not empty in 7.4.7, 7.4.8

Posted: Wed Aug 04, 2021 10:17 pm
by PyTom
A fix for this will be in the August 5th nightly.