mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Fix trying to fetch more MySQL rows than are available.
MySQL returns -1 on error in an unsigned field which was breaking this.
This commit is contained in:
parent
3ad07f7082
commit
6e2f3cef2e
@ -170,7 +170,8 @@ public:
|
||||
MySQLresult(MYSQL_RES* res, unsigned long affected_rows)
|
||||
: err(SQL::SUCCESS)
|
||||
{
|
||||
if (affected_rows >= 1)
|
||||
// mysql returns -1 on error even though the return type is unsigned
|
||||
if (affected_rows >= 1 && affected_rows != (unsigned long)-1)
|
||||
{
|
||||
rows = int(affected_rows);
|
||||
fieldlists.resize(rows);
|
||||
|
Loading…
x
Reference in New Issue
Block a user