diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 7a0b2a8de8ce..8d0674f5e89d 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -2864,8 +2864,8 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays() } // add our PARAM and null seperator - mCachedAttrParamNames [mNumCachedAttrs + 1] = "PARAM"; - mCachedAttrParamValues[mNumCachedAttrs + 1] = nsnull; + mCachedAttrParamNames [mNumCachedAttrs] = ToNewUTF8String(NS_LITERAL_STRING("PARAM")); + mCachedAttrParamValues[mNumCachedAttrs] = nsnull; // now fill in the PARAM name/value pairs from the cached DOM nodes c = 0; diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index 7a0b2a8de8ce..8d0674f5e89d 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -2864,8 +2864,8 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays() } // add our PARAM and null seperator - mCachedAttrParamNames [mNumCachedAttrs + 1] = "PARAM"; - mCachedAttrParamValues[mNumCachedAttrs + 1] = nsnull; + mCachedAttrParamNames [mNumCachedAttrs] = ToNewUTF8String(NS_LITERAL_STRING("PARAM")); + mCachedAttrParamValues[mNumCachedAttrs] = nsnull; // now fill in the PARAM name/value pairs from the cached DOM nodes c = 0; diff --git a/modules/plugin/base/src/ns4xPluginInstance.cpp b/modules/plugin/base/src/ns4xPluginInstance.cpp index e217b7e57c1b..18df69995998 100644 --- a/modules/plugin/base/src/ns4xPluginInstance.cpp +++ b/modules/plugin/base/src/ns4xPluginInstance.cpp @@ -822,7 +822,7 @@ nsresult ns4xPluginInstance::InitializePlugin(nsIPluginInstancePeer* peer) const char* const* pnames = nsnull; const char* const* pvalues = nsnull; if (NS_SUCCEEDED(taginfo->GetParameters(pcount, pnames, pvalues))) { - NS_ASSERTION(nsnull == values[count+1], "attribute/parameter array not setup correctly for 4.x plugins"); + NS_ASSERTION(nsnull == values[count], "attribute/parameter array not setup correctly for 4.x plugins"); count += ++pcount; //if it's all setup correctly, then all we need is to change the count } }