aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fig/FIG0_9.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fig/FIG0_9.cpp b/src/fig/FIG0_9.cpp
index bfa187f..a68dc6f 100644
--- a/src/fig/FIG0_9.cpp
+++ b/src/fig/FIG0_9.cpp
@@ -183,8 +183,8 @@ FillStatus FIG0_9::fill(uint8_t *buf, size_t max_size)
remaining -= 2;
for (uint16_t sid : ef.sids) {
- uint16_t *sid_field = (uint16_t*)buf;
- *sid_field = htons(sid);
+ const uint16_t sid_field = htons(sid);
+ memcpy(buf, &sid_field, 2);
buf += 2;
fig0_9->Length += 2;
remaining -= 2;