summaryrefslogtreecommitdiff
path: root/src/perl
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-19 22:47:32 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-19 22:47:32 +0000
commit32f26d0ff5e07faedb3b7fe44fec61ab7b3ec041 (patch)
treede79abadf7f8d32890b763f4a127c8969e0baf87 /src/perl
parent879702897be8d953ff4c2f8152d9ae3f77fb21a4 (diff)
downloadirssi-32f26d0ff5e07faedb3b7fe44fec61ab7b3ec041.zip
perl_command() - just a small sanity check that we're not sending empty
command. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2106 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl')
-rw-r--r--src/perl/perl-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index 8de38ad0..a57c81e8 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -453,6 +453,9 @@ void perl_command(const char *cmd, SERVER_REC *server, WI_ITEM_REC *item)
const char *cmdchars;
char *sendcmd = (char *) cmd;
+ if (*cmd == '\0')
+ return;
+
cmdchars = settings_get_str("cmdchars");
if (strchr(cmdchars, *cmd) == NULL) {
/* no command char - let's put it there.. */