Bug 336091 - Initialize the out parameters of nsEditor::GetStartNodeAndOffset correctly; r,a=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 09 Feb 2011 14:07:56 -0500
changeset 62307 3ce0b8db2ebb198ff7b46304fe670c05738c7126
parent 62306 7573d51778309110084e9cde781e0a27ab7c43a6
child 62308 83a0538956cc3fa842c7e786670a07417e875409
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs336091
milestone2.0b12pre
Bug 336091 - Initialize the out parameters of nsEditor::GetStartNodeAndOffset correctly; r,a=roc
editor/libeditor/base/nsEditor.cpp
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -3878,18 +3878,17 @@ nsEditor::GetChildAt(nsIDOMNode *aParent
 nsresult 
 nsEditor::GetStartNodeAndOffset(nsISelection *aSelection,
                                        nsIDOMNode **outStartNode,
                                        PRInt32 *outStartOffset)
 {
   NS_ENSURE_TRUE(outStartNode && outStartOffset && aSelection, NS_ERROR_NULL_POINTER);
 
   *outStartNode = nsnull;
-
-  // brade:  set outStartNode to null or ?
+  *outStartOffset = 0;
 
   nsCOMPtr<nsISelectionPrivate>selPrivate(do_QueryInterface(aSelection));
   nsCOMPtr<nsIEnumerator> enumerator;
   nsresult result = selPrivate->GetEnumerator(getter_AddRefs(enumerator));
   NS_ENSURE_SUCCESS(result, result);
   NS_ENSURE_TRUE(enumerator, NS_ERROR_FAILURE);
 
   enumerator->First();