File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1260,12 +1260,12 @@ SPL_METHOD(SplDoublyLinkedList, add)
1260
1260
/* If index is the last entry+1 then we do a push because we're not inserting before any entry */
1261
1261
spl_ptr_llist_push (intern -> llist , value TSRMLS_CC );
1262
1262
} else {
1263
- /* Get the element we want to insert before */
1264
- element = spl_ptr_llist_offset (intern -> llist , index , intern -> flags & SPL_DLLIST_IT_LIFO );
1265
-
1266
1263
/* Create the new element we want to insert */
1267
1264
spl_ptr_llist_element * elem = emalloc (sizeof (spl_ptr_llist_element ));
1268
1265
1266
+ /* Get the element we want to insert before */
1267
+ element = spl_ptr_llist_offset (intern -> llist , index , intern -> flags & SPL_DLLIST_IT_LIFO );
1268
+
1269
1269
elem -> data = value ;
1270
1270
elem -> rc = 1 ;
1271
1271
/* connect to the neighbours */
You can’t perform that action at this time.
0 commit comments