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

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
jeffster
Veteran
Posts: 382
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

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

#1 Post by jeffster »

This is a screenshot of two textbuttons and an input in between:
nonempty.png
nonempty.png (4.41 KiB) Viewed 4113 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()

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

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

#2 Post by PyTom »

A fix for this will be in the August 5th nightly.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users