]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/core-error.c
handle failure to parse proplist in cli-command gracefully
[pulseaudio] / src / pulsecore / core-error.c
index 3d6c2c3be628cd6f144626a7a541507814ec494a..c4408069648ace97bae7487e4ccc1d4f4ab47e79 100644 (file)
@@ -6,7 +6,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
@@ -47,6 +47,9 @@ const char* pa_cstrerror(int errnum) {
     char *translated, *t;
     char errbuf[128];
 
     char *translated, *t;
     char errbuf[128];
 
+    if (errnum < 0)
+        errnum = -errnum;
+
     if ((t = PA_STATIC_TLS_GET(cstrerror)))
         pa_xfree(t);
 
     if ((t = PA_STATIC_TLS_GET(cstrerror)))
         pa_xfree(t);