mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fix a mysql crash after CString -> ke::AString conversion
This commit is contained in:
parent
7f9d677f89
commit
c3e0753455
@ -567,7 +567,8 @@ void AtomicResult::CopyFrom(IResultSet *rs)
|
||||
{
|
||||
*m_Table[i] = rs->FieldNumToName(i);
|
||||
} else {
|
||||
m_Table[i] = new ke::AString(rs->FieldNumToName(i));
|
||||
const char* string = rs->FieldNumToName(i);
|
||||
m_Table[i] = new ke::AString(string ? string : "");
|
||||
}
|
||||
}
|
||||
|
||||
@ -582,7 +583,8 @@ void AtomicResult::CopyFrom(IResultSet *rs)
|
||||
{
|
||||
*m_Table[idx] = row->GetString(i);
|
||||
} else {
|
||||
m_Table[idx] = new ke::AString(row->GetString(i));
|
||||
const char* string = row->GetString(i);
|
||||
m_Table[idx] = new ke::AString(string ? string : "");
|
||||
}
|
||||
}
|
||||
rs->NextRow();
|
||||
|
Loading…
Reference in New Issue
Block a user