Commit 2d7093b7 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix silly error when testing for null strings from DB.

parent e0aff8cb
......@@ -887,7 +887,7 @@ dorpms(int sock, struct in_addr ipaddr, char *request, int tcp)
* Text string is a colon separated list.
*/
row = mysql_fetch_row(res);
if (! row[0]) {
if (! row[0] || !row[0][0]) {
mysql_free_result(res);
return 0;
}
......@@ -955,7 +955,7 @@ dostartcmd(int sock, struct in_addr ipaddr, char *request, int tcp)
* Simple text string.
*/
row = mysql_fetch_row(res);
if (! row[0]) {
if (! row[0] || !row[0][0]) {
mysql_free_result(res);
return 0;
}
......@@ -1216,7 +1216,7 @@ nodeidtonickname(char *nodeid, char *nickname)
}
row = mysql_fetch_row(res);
mysql_free_result(res);
if (! row[0])
if (! row[0] || !row[0][0])
return 1;
strcpy(nickname, row[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment