bug 395822: Use correct String::Find overload r=jonas, a=release drivers
authortglek@mozilla.com
Mon, 12 Nov 2007 14:01:48 -0800
changeset 7873 986fcf4d38829f46d846c833326537d24e690dfd
parent 7872 21e54e486bb74740c2b4b08d476215a4a531e7be
child 7874 8e4e03f15c9c0aaae961ec4515e5ad79881f73a5
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonas, release
bugs395822
milestone1.9b2pre
bug 395822: Use correct String::Find overload r=jonas, a=release drivers
content/base/src/nsPlainTextSerializer.cpp
--- a/content/base/src/nsPlainTextSerializer.cpp
+++ b/content/base/src/nsPlainTextSerializer.cpp
@@ -609,17 +609,17 @@ nsPlainTextSerializer::DoOpenContainer(c
         mPreFormatted = PR_TRUE;
         PRInt32 widthOffset = style.Find("width:");
         if (widthOffset >= 0) {
           // We have to search for the ch before the semicolon,
           // not for the semicolon itself, because nsString::ToInteger()
           // considers 'c' to be a valid numeric char (even if radix=10)
           // but then gets confused if it sees it next to the number
           // when the radix specified was 10, and returns an error code.
-          PRInt32 semiOffset = style.Find("ch", widthOffset+6);
+          PRInt32 semiOffset = style.Find("ch", PR_FALSE, widthOffset+6);
           PRInt32 length = (semiOffset > 0 ? semiOffset - widthOffset - 6
                             : style.Length() - widthOffset);
           nsAutoString widthstr;
           style.Mid(widthstr, widthOffset+6, length);
           PRInt32 err;
           PRInt32 col = widthstr.ToInteger(&err);
 
           if (NS_SUCCEEDED(err)) {