X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/33388f98fd5499197f5309befd2106ad7b65699c..d86dfb91c834be43d9bcddd69ddbc7e463825fbd:/lib/base/estring.cpp diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp index 22b65698..4259c58f 100644 --- a/lib/base/estring.cpp +++ b/lib/base/estring.cpp @@ -595,13 +595,13 @@ std::string removeDVBChars(const std::string &s) int len = s.length(); - for(int i = 0; i < len-1; i++) + for(int i = 0; i < len; i++) { unsigned char c1 = s[i]; unsigned int c; /* UTF8? decode (but only simple) */ - if(c1 > 0x80) + if((c1 > 0x80) && (i < len-1)) { unsigned char c2 = s[i + 1]; c = ((c1&0x3F)<<6) + (c2&0x3F);