aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig0_0.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 14:02:01 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 14:02:01 +0100
commit90101548ec43fd50ddc143eb0cbe99bdd0b47c6f (patch)
tree6a4a7eaa55a31a7d54eeb0c34ef9bf3ef4547b94 /src/fig0_0.cpp
parentea56f46c8f017ef98ae647abc99ceecba9dce1e1 (diff)
downloadetisnoop-90101548ec43fd50ddc143eb0cbe99bdd0b47c6f.tar.gz
etisnoop-90101548ec43fd50ddc143eb0cbe99bdd0b47c6f.tar.bz2
etisnoop-90101548ec43fd50ddc143eb0cbe99bdd0b47c6f.zip
Improve FIG0/13, add 0/7, avoid int overflows
Diffstat (limited to 'src/fig0_0.cpp')
-rw-r--r--src/fig0_0.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fig0_0.cpp b/src/fig0_0.cpp
index 96724f1..6f60c3b 100644
--- a/src/fig0_0.cpp
+++ b/src/fig0_0.cpp
@@ -35,7 +35,7 @@ fig_result_t fig0_0(fig0_common_t& fig0, const display_settings_t &disp)
fig_result_t r;
uint8_t* f = fig0.f;
- const uint16_t eid = f[1]*256+f[2];
+ const uint16_t eid = read_u16_from_buf(f + 1);
r.msgs.push_back(strprintf("Ensemble ID=0x%02x", eid));
if (fig0.fibcrccorrect) {
fig0.ensemble.EId = eid;