From c7409cce03a9a29dc8ff41691d7cb47a5f59abf2 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 6 Mar 2026 13:28:51 +0000 Subject: util/nvmutil: clean up set_word Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') 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; } -- cgit v1.2.1