From 90101548ec43fd50ddc143eb0cbe99bdd0b47c6f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 2 Nov 2020 14:02:01 +0100 Subject: Improve FIG0/13, add 0/7, avoid int overflows --- src/ensembledatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ensembledatabase.cpp') 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 -- cgit v1.2.3