mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 21:00:20 +00:00
fix(variables): add null terminator to the end of strings written into variables
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user