mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-08 01:47:11 +02:00
Prevent server crash by accessing row data from MySQL result-set when there is no valid row available. Throw an error instead. Should close #25
This commit is contained in:
@ -41,6 +41,15 @@ protected:
|
||||
void ValidateCreated() const;
|
||||
#endif // _DEBUG
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Validate the associated result-set handle, field index and row, and throw an error if invalid.
|
||||
*/
|
||||
#if defined(_DEBUG) || defined(SQMOD_EXCEPTLOC)
|
||||
void ValidateStepped(CCStr file, Int32 line) const;
|
||||
#else
|
||||
void ValidateStepped() const;
|
||||
#endif // _DEBUG
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Validate the associated result-set handle and field index, and throw an error if invalid.
|
||||
*/
|
||||
@ -59,6 +68,15 @@ protected:
|
||||
const ResRef & GetCreated() const;
|
||||
#endif // _DEBUG
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Validate the associated result-set handle field index and row, and throw an error if invalid.
|
||||
*/
|
||||
#if defined(_DEBUG) || defined(SQMOD_EXCEPTLOC)
|
||||
const ResRef & GetStepped(CCStr file, Int32 line) const;
|
||||
#else
|
||||
const ResRef & GetStepped() const;
|
||||
#endif // _DEBUG
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Validate the associated result-set handle and field index, and throw an error if invalid.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user