From: H.G. Muller Date: Sat, 10 Sep 2011 20:35:14 +0000 (+0200) Subject: Fix playing sounds when -soundProgram is empty X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e3fe733c547d0f8c91c1ff5374a569477a7c1cea;p=xboard.git Fix playing sounds when -soundProgram is empty It made no sense to just send the names of the sound files to the shell. So the soundProgram isnow tested for being an empty string, and if so, PlaySound() is aborted. --- diff --git a/xboard.c b/xboard.c index 4a6d7f0..21bc9bb 100644 --- a/xboard.c +++ b/xboard.c @@ -7200,6 +7200,7 @@ PlaySound(name) } else { char buf[2048]; char *prefix = "", *sep = ""; + if(appData.soundProgram[0] == NULLCHAR) return; if(!strchr(name, '/')) { prefix = appData.soundDirectory; sep = "/"; } snprintf(buf, sizeof(buf), "%s '%s%s%s' &", appData.soundProgram, prefix, sep, name); system(buf);