1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

Fix bug 2148

Ensure that backslashes in GetInfo data are escaped.
This commit is contained in:
Steve Daulton 2019-07-02 15:02:00 +01:00
parent 5741589758
commit f99d564fd6

View File

@ -65,8 +65,15 @@
(setf info (aud-do (format nil "GetInfo: type=~a format=LISP" type)))
(if (not (last info))
(error (format nil "(aud-get-info ~a) failed.~%" str)))
(let ((info-string (first info)))
(eval-string (quote-string info-string)))))
(let* ((info-string (first info))
(sanitized ""))
;; Escape backslashes
(dotimes (i (length info-string))
(setf ch (subseq info-string i (1+ i)))
(if (string= ch "\\")
(string-append sanitized "\\\\")
(string-append sanitized ch)))
(eval-string (quote-string sanitized)))))
;;; Path to Nyquist .lsp files.