Browse Source

babel: Fix data structure corruption when sorting parameters

* lisp/ob.el (org-babel-sha1-hash): Avoid corrupting `info' data
structure by side-effects of `sort'.
Dan Davison 9 years ago
parent
commit
cf0cdd7785
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/ob.el

+ 1 - 1
lisp/ob.el

@@ -606,7 +606,7 @@ the current subtree."
   (let ((print-level nil)
 	(info (or info (org-babel-get-src-block-info))))
     (setf (nth 2 info)
-	  (sort (nth 2 info)
+	  (sort (copy-tree (nth 2 info))
 		(lambda (a b) (string< (car a) (car b)))))
     (let ((hash (sha1
 		 (format "%s-%s"