diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 13:28:51 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 13:28:51 +0000 |
| commit | c7409cce03a9a29dc8ff41691d7cb47a5f59abf2 (patch) | |
| tree | 0c853e6b1c638ad4440326f1261a04fe299c3f40 /util | |
| parent | feee6a728f43e9b7f93181396231895cf5aa5637 (diff) | |
util/nvmutil: clean up set_word
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index bf7c0030..b735b351 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -628,8 +628,8 @@ set_word(size_t pos16, int p, uint16_t val16) check_bound((ssize_t)pos16, p); pos = get_word_pos(pos16, p); - buf[pos++] = (uint8_t)(val16 & 0xff); - buf[pos] = (uint8_t)(val16 >> 8); + buf[pos] = (uint8_t)(val16 & 0xff); + buf[pos + 1] = (uint8_t)(val16 >> 8); part_modified[p] = 1; } |
