summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51a6aba)
raw | patch | inline | side by side (parent: 51a6aba)
author | ishmal <ishmal@users.sourceforge.net> | |
Sat, 8 Mar 2008 20:41:09 +0000 (20:41 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Sat, 8 Mar 2008 20:41:09 +0000 (20:41 +0000) |
src/dom/uri.cpp | patch | blob | history |
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index db45a2abf1bd9e35b1ac24286d9673272795d400..562a674bbb2aaf02a3505d9b7c42296b42945c55 100644 (file)
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005-2007 Bob Jamison
+ * Copyright (C) 2005-2008 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static int findLast(const std::vector<int> &str, int ch)
{
- // TODO FIXME BUGBUG
- // This loop appears to be infinite, so it is probably not being called.
- // Test for a problem, then fix after it has been observed locking up.
- for (unsigned int i = str.size()-1 ; i>=0 ; i--)
+ /**
+ * Fixed. Originally I used an unsigned int for str.size(),
+ * which was dumb, since i>=0 would always be true.
+ */
+ for (int i = ((int)str.size())-1 ; i>=0 ; i--)
{
if (ch == str[i])
return i;