projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f03059d
)
URIUtils: fix out of range exception in resolvePath()
author
montellese
<montellese@xbmc.org>
Mon, 3 Mar 2014 22:43:01 +0000
(23:43 +0100)
committer
montellese
<montellese@xbmc.org>
Fri, 7 Mar 2014 20:44:59 +0000
(21:44 +0100)
xbmc/utils/URIUtils.cpp
patch
|
blob
|
history
diff --git
a/xbmc/utils/URIUtils.cpp
b/xbmc/utils/URIUtils.cpp
index
ea4ff97
..
12dadba
100644
(file)
--- a/
xbmc/utils/URIUtils.cpp
+++ b/
xbmc/utils/URIUtils.cpp
@@
-1226,10
+1226,12
@@
std::string URIUtils::resolvePath(const std::string &path)
CStdString realPath;
int i = 0;
// re-add any / or \ at the beginning
-
while (path.at(i) == delim.at(0)
)
+
for (std::string::const_iterator itPath = path.begin(); itPath != path.end(); ++itPath
)
{
+ if (*itPath != delim.at(0))
+ break;
+
realPath += delim;
- i++;
}
// put together the path
realPath += StringUtils::Join(realParts, delim);