From b541c56c7e4e17abb44fcb72c1a1b7bdeeb6c0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Tue, 5 Apr 2022 16:40:41 +0200 Subject: [PATCH] make sure to clean all TextEntryPayloads after enter button has been pressed --- services/gam/src/modal/textentry.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/gam/src/modal/textentry.rs b/services/gam/src/modal/textentry.rs index 37bd45769..8970d710e 100644 --- a/services/gam/src/modal/textentry.rs +++ b/services/gam/src/modal/textentry.rs @@ -383,8 +383,11 @@ impl ActionApi for TextEntry { payloads.0[..self.max_field_amount as usize].copy_from_slice(&self.action_payloads[..self.max_field_amount as usize]); let buf = Buffer::into_buf(payloads).expect("couldn't convert message to payload"); buf.send(self.action_conn, self.action_opcode).map(|_| ()).expect("couldn't send action message"); - payload.volatile_clear(); // ensure the local copy of text is zero'd out - // TODO: zero out EVERYTHING here! + + for payload in self.action_payloads.iter_mut() { + payload.volatile_clear(); + } + return (None, true) } '↑' => {