shithub: sox

Download patch

ref: 0581ae2de188c72661050cee01aa41157ff90256
parent: 155fd6b7d6ff7f01050e87b36dece556795648eb
author: cbagwell <cbagwell>
date: Sat Jan 19 20:29:15 EST 2008

Fix crash when "rec" is ran with no arguments.

--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
   o Fix spurious 'Premature EOF' message in some circumstances.  (robs)
   o Switched to 16-bit for libao driver since not all its plugins
     support it (such as oss, nas, and pulse audio) (Morita Sho)
+  o Stop crash when "rec" is ran with no arguments (Morita Sho).
 
   Internal improvements:
 
--- a/src/sox.c
+++ b/src/sox.c
@@ -584,8 +584,8 @@
     file_count++;
 
     f = new_file();
-    set_device(f, sox_true);
     files[0] = f;
+    set_device(f, sox_true);
   }
 }