mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
handle negative error codes
This commit is contained in:
parent
341f44fa24
commit
0dd8a3306f
1 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,10 @@ const char*pa_strerror(int error) {
|
|||
|
||||
pa_init_i18n();
|
||||
|
||||
if (error < 0 || error >= PA_ERR_MAX)
|
||||
if (error < 0)
|
||||
error = -error;
|
||||
|
||||
if (error >= PA_ERR_MAX)
|
||||
return NULL;
|
||||
|
||||
return _(errortab[error]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue