forked from Lainports/freebsd-ports
A nasty bug strikes on systems, where size_t and unsigned int are different things -- such as most 64-bit systems. Stuffing the (size_t)-1 into unsigned int results in 0xffff, which is different from string::npos (0xffffffff)... Submitted by: Mikhail T. <mi+thun@aldan.algebra.com> (via e-mail)
11 lines
428 B
C++
11 lines
428 B
C++
--- ./src/xmlpull/XmlUtils.cpp.orig 2009-12-16 02:36:41.855644800 +0000
|
|
+++ ./src/xmlpull/XmlUtils.cpp 2009-12-16 02:37:03.225260481 +0000
|
|
@@ -212,7 +212,7 @@
|
|
// - use-case with a single '/' added (I am not sure this is conform to spec)
|
|
// #ifdef _WIN32
|
|
#if !defined(_WIN32)
|
|
- unsigned int p;
|
|
+ size_t p;
|
|
if ((p=uri.find("file:///"))!=std::string::npos)
|
|
{
|
|
uri = uri.substr(p+7, uri.length()-p-7);
|