Skip to content

Commit ea09c36

Browse files
committed
Fix notes on firmware version length.
1 parent 2a98af2 commit ea09c36

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

neotron-bmc-commands/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ The three bytes are `major`, `minor` and `patch`. This document corresponds to
5757
### Address 0x01 - Firmware Version
5858

5959
This read-only register returns the firmware version of the NBMC, as a UTF-8
60-
string. The register length is always 64 bytes, and the string is null-padded.
60+
string. The register length is always 32 bytes, and the string is null-padded.
6161
We also guarantee that the firmware version will always be less than or equal to
62-
63 bytes, so you can also treat this string as null-terminated.
62+
31 bytes, so you can also treat this string as null-terminated.
6363

6464
An official release will have a version string of the form `tags/v1.2.3`. An
6565
unofficial release might be `heads/develop-dirty`. It is not recommended that

neotron-bmc-pico/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828
let mut output = version_output.stdout;
2929
output.pop();
3030

31-
if output.len() > 32 {
31+
if output.len() >= 32 {
3232
panic!("Version too long!");
3333
}
3434

0 commit comments

Comments
 (0)