projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3103113
)
CUtf8Utils::RFindValidUtf8Char: fix check of unsigned variable
author
Karlson2k
<k2k@narod.ru>
Thu, 28 Nov 2013 15:04:05 +0000
(19:04 +0400)
committer
Karlson2k
<k2k@narod.ru>
Thu, 28 Nov 2013 15:04:05 +0000
(19:04 +0400)
xbmc/utils/Utf8Utils.cpp
patch
|
blob
|
history
diff --git
a/xbmc/utils/Utf8Utils.cpp
b/xbmc/utils/Utf8Utils.cpp
index
aa39108
..
cac02d4
100644
(file)
--- a/
xbmc/utils/Utf8Utils.cpp
+++ b/
xbmc/utils/Utf8Utils.cpp
@@
-46,7
+46,7
@@
size_t CUtf8Utils::RFindValidUtf8Char(const std::string& str, const size_t start
const char* strC = str.c_str();
size_t pos = (startPos >= len) ? len - 1 : startPos;
- while (pos
>= 0)
+ while (pos
< len) // pos is unsigned, after zero pos becomes large then len
{
if (SizeOfUtf8Char(strC + pos))
return pos;