Fixed a backwards compatibility issue with free result

This commit is contained in:
David Anderson 2006-05-11 12:11:42 +00:00
parent 19f2be0c96
commit f8809e2663
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ void OnAmxxAttach()
MF_AddNatives(g_BaseSqlNatives);
MF_AddNatives(g_ThreadSqlNatives);
MF_RegisterFunction(&g_Mysql, "GetSqlDriver");
if (!MF_RequestFunction("GetDbDriver") || !MF_FindLibrary("SQLITE", LibType_Library))
if (!MF_RequestFunction("GetDbDriver") && !MF_FindLibrary("SQLITE", LibType_Library))
{
MF_AddNatives(g_OldCompatNatives);
MF_AddLibraries("dbi", LibType_Class, &g_ident);

View File

@ -327,6 +327,12 @@ static cell AMX_NATIVE_CALL dbi_free_result(AMX *amx, cell *params)
{
cell *_r = MF_GetAmxAddr(amx, params[1]);
cell num = *_r;
if (!num)
{
return 1;
}
oldresult_s *oldrs = (oldresult_s *)GetHandle(num, Handle_OldResult);
if (!oldrs)
{