From ff5b66c4a5f323285762f7a2d091af792fb8e6db Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 11 Jul 2025 13:47:13 -0700 Subject: [PATCH] Clean meta buf --- src/devices/system.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/devices/system.c b/src/devices/system.c index bfd0640..3a87b18 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -108,20 +108,16 @@ char * metadata_read_name() { int i; - + for(i = 0; i < METADATA_LEN + 1; i++) + metadata_buffer[i] = 0; if(metadata_addr == 0) - /* we probably do not have any metadata */ return metadata_buffer; - if(uxn.ram[metadata_addr] != 0x00) - /* metadata should start with a 0 */ return metadata_buffer; - for(i = 1; i < METADATA_LEN; i++) { char c = uxn.ram[metadata_addr + i]; if(c == 0x00 || c == 0x0a) break; - metadata_buffer[i - 1] = c; } return metadata_buffer;