From 2033b55f91876c8fc0d4cd3cdf9c67972ad5490c Mon Sep 17 00:00:00 2001 From: Riley Beckett Date: Mon, 27 Oct 2025 16:30:01 -0400 Subject: add -P password flag --- graphics.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'graphics.c') diff --git a/graphics.c b/graphics.c index 9f66702..d5a9b91 100644 --- a/graphics.c +++ b/graphics.c @@ -246,6 +246,12 @@ typedef struct { void init_text_buffer(client_state* state, text_buffer_t* buffer, char* text, size_t text_len) { buffer->pixel_len = 0; + char buf[text_len]; + if (state->password && text == state->input_buffer) { + memset(buf, '*', text_len); + text = buf; + } + // generate openg bullshit glGenVertexArrays(1, &buffer->vao); glBindVertexArray(buffer->vao); -- cgit v1.2.3