aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-11-21 22:37:27 +0100
committerMarvin Borner2020-11-21 22:37:27 +0100
commitac9759c082ceddd9818359eb33ccbbc6c7841676 (patch)
treebe4118ae0edad4d399780ce33e3f5ef1c43303f5
parentb05a30248a49913b6d4c09cc2f76c9527d88935a (diff)
Well, that's a strange fix
This GUI bug actually caused DNS issues - LOL!
-rw-r--r--libgui/gui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgui/gui.c b/libgui/gui.c
index c3369bb..50c81c5 100644
--- a/libgui/gui.c
+++ b/libgui/gui.c
@@ -409,7 +409,8 @@ void gui_event_loop(struct element *container)
event->scancode == KEY_ENTER) {
focused->event.on_submit(event, focused);
// Clear!
- ((struct element_text_input *)focused->data)->text[0] = '\0';
+ char *t = ((struct element_text_input *)focused->data)->text;
+ memset(t, 0, strlen(t));
gui_sync_text_input(focused);
merge_elements(get_root(focused->window_id));
gfx_redraw_focused();