aboutsummaryrefslogtreecommitdiffstats
path: root/src/ensembledatabase.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/ensembledatabase.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/ensembledatabase.cpp')
-rw-r--r--src/ensembledatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ensembledatabase.cpp b/src/ensembledatabase.cpp
index 735aca3..550fdf0 100644
--- a/src/ensembledatabase.cpp
+++ b/src/ensembledatabase.cpp
@@ -46,7 +46,7 @@ static string ucs2toutf8(const uint8_t *ucs2, size_t len_bytes)
wstring ucs2label;
for (size_t i = 0; i < len_bytes-1; i+=2) {
- ucs2label += (wchar_t)(ucs2[i] * 256 + ucs2[i+1]);
+ ucs2label += (wchar_t)(ucs2[i] * 256uL + ucs2[i+1]);
}
// Can throw range_error