pkgsrc/audio/mpg123/patches/patch-ab
tron 63d7bacea1 Fix bug which caused a segmentation fault if "mpg123" was started without
a tty. Patch supply by the author Michael Hipp.
1999-07-18 19:23:54 +00:00

23 lines
657 B
Text

$NetBSD: patch-ab,v 1.3 1999/07/18 19:23:55 tron Exp $
--- mpg123.c.orig Tue Jun 15 22:21:36 1999
+++ mpg123.c Sun Jul 18 21:20:19 1999
@@ -177,6 +177,9 @@
_exit(0);
default: /* parent */
xfermem_init_writer (buffermem);
+ if (xfermem_block(XF_WRITER, buffermem) == XF_CMD_TERMINATE) {
+ intflag = TRUE;
+ }
param.outmode = DECODE_BUFFER;
}
}
@@ -918,7 +921,7 @@
{
const char *term_type;
term_type = getenv("TERM");
- if (!strcmp(term_type,"xterm"))
+ if (term_type && !strcmp(term_type,"xterm"))
{
fprintf(stderr, "\033]0;%s\007", filename);
}