]> code.delx.au - pulseaudio/commitdiff
pacmd: handle multi word commands in argv[] properly
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Aug 2009 02:12:36 +0000 (04:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 14 Aug 2009 02:12:36 +0000 (04:12 +0200)
src/utils/pacmd.c

index e4d054b8d594d88795010b64a117a0149944e286..5ef57e3b5b9ed310c64ed2cdf4cde08bbd046627 100644 (file)
@@ -116,7 +116,7 @@ int main(int argc, char*argv[]) {
             size_t k;
 
             k = PA_MIN(sizeof(ibuf) - ibuf_length, strlen(argv[i]));
-            memcpy(ibuf + ibuf_length, argv[1], k);
+            memcpy(ibuf + ibuf_length, argv[i], k);
             ibuf_length += k;
 
             if (ibuf_length < sizeof(ibuf)) {