Merge pull request #200 from ClaudiuHKS/master
Set length to 0 on failed lookup in lookupString()
This commit is contained in:
commit
553663c952
|
@ -15,7 +15,7 @@ PUBLIC_ROOT = ../../public
|
||||||
|
|
||||||
PROJECT = geoip
|
PROJECT = geoip
|
||||||
|
|
||||||
OBJECTS = amxxmodule.cpp GeoIP2/maxminddb.cpp geoip_main.cpp geoip_natives.cpp geoip_util.cpp
|
OBJECTS = amxxmodule.cpp GeoIP2/maxminddb.c geoip_main.cpp geoip_natives.cpp geoip_util.cpp
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
|
|
@ -166,6 +166,9 @@ const char *lookupString(const char *ip, const char **path, int *length)
|
||||||
|
|
||||||
if (!lookupByIp(ip, path, &result))
|
if (!lookupByIp(ip, path, &result))
|
||||||
{
|
{
|
||||||
|
if (length)
|
||||||
|
*length = 0;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\GeoIP2\maxminddb.cpp" />
|
<ClCompile Include="..\GeoIP2\maxminddb.c" />
|
||||||
<ClCompile Include="..\geoip_main.cpp" />
|
<ClCompile Include="..\geoip_main.cpp" />
|
||||||
<ClCompile Include="..\geoip_natives.cpp" />
|
<ClCompile Include="..\geoip_natives.cpp" />
|
||||||
<ClCompile Include="..\geoip_util.cpp" />
|
<ClCompile Include="..\geoip_util.cpp" />
|
||||||
|
@ -120,4 +120,4 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\GeoIP2\maxminddb.cpp">
|
<ClCompile Include="..\GeoIP2\maxminddb.c">
|
||||||
<Filter>GeoIP2</Filter>
|
<Filter>GeoIP2</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\geoip_util.cpp">
|
<ClCompile Include="..\geoip_util.cpp">
|
||||||
|
@ -70,4 +70,4 @@
|
||||||
<Filter>Pawn Includes</Filter>
|
<Filter>Pawn Includes</Filter>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user