xC: fix a segmentation fault on startup
Alpine 3.23 Success
Arch Linux AUR Success
OpenBSD 7.8 Success

A last-minute "harmless" change turns out to have side-effects.
This commit is contained in:
2026-07-20 02:17:00 +02:00
parent da2c8de56f
commit 0c256943fd
+1 -1
View File
@@ -394,7 +394,7 @@ static void
input_set_prompt (struct input *self, char *prompt)
{
// Redisplay is an expensive operation
if (prompt && !strcmp (prompt, self->prompt))
if (prompt && self->prompt && !strcmp (prompt, self->prompt))
free (prompt);
else
{