git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d1b934
)
fix bug: last char in removeDVBChars was removed
author
Felix Domke
<tmbinc@elitedvb.net>
Fri, 11 Nov 2005 03:30:49 +0000
(
03:30
+0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Fri, 11 Nov 2005 03:30:49 +0000
(
03:30
+0000)
lib/base/estring.cpp
patch
|
blob
|
history
diff --git
a/lib/base/estring.cpp
b/lib/base/estring.cpp
index 22b65698d2916ace5c2a5f36dab717fe6f1df944..4259c58f012fb6e0c9749b1226b6ed745b5bbe67 100644
(file)
--- 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);