Tag: Fix segfault in tag_del (Bug #50 signaled by addikt1ve)

This commit is contained in:
Martin Duquesnoy 2010-04-19 01:29:09 +02:00
parent 129a21bada
commit feadae05c8
2 changed files with 6 additions and 1 deletions

View File

@ -455,9 +455,13 @@ tag_delete(int s, int tag)
void
uicb_tag_del(uicb_t cmd)
{
int n;
screen_get_sel();
tag_delete(selscreen, ((strlen((char*)cmd)) ? atoi(cmd) : seltag[selscreen]));
n = (cmd ? atoi(cmd) : seltag[selscreen]);
tag_delete(selscreen, n);
return;
}

View File

@ -40,6 +40,7 @@
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <ctype.h>
#include <fcntl.h>
#include <time.h>
#include <getopt.h>