From e3fe733c547d0f8c91c1ff5374a569477a7c1cea Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 10 Sep 2011 22:35:14 +0200 Subject: [PATCH] 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. --- xboard.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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); -- 1.7.0.4