summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/nvmutil/nvmutil.c4
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;
}