fix(variables): add null terminator to the end of strings written into variables

This commit is contained in:
alex committed 2025-10-30 23:15:18 -04:00
1 parent 0368a170a8
commit a2f017ba30
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -85,8 +85,10 @@ impl BootloaderInterface {
.encode_utf16()
.flat_map(|c| c.to_le_bytes())
.collect::<Vec<u8>>();
// Write the bytes (including the null terminator) into the data buffer.
// Write the bytes into the data buffer.
data.extend_from_slice(&encoded);
// Add a null terminator to the end of the entry.
data.push(0);
}
Self::VENDOR.set(
"LoaderEntries",