printf_mysql_query("SELECT `trigger` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, BOTID);
res = mysql_use();
row = mysql_fetch_row(res);
- strcpy(trigger, (strlen(row[0]) ? row[0] : "+"));
+ strcpy(trigger, ((row && strlen(row[0])) ? row[0] : "+"));
}
static void start_bots() {
printf_mysql_query("SELECT `trigger` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, BOTID);
res = mysql_use();
row = mysql_fetch_row(res);
- strcpy(trigger, (strlen(row[0]) ? row[0] : "~"));
+ strcpy(trigger, ((row && strlen(row[0])) ? row[0] : "~"));
}
static void start_bots() {