mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-30 19:52:17 +01:00
Fixed bug where InterfaceSearch() did not actually resolve whether a number was present or not
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40242
This commit is contained in:
parent
d97f336edc
commit
0b0dc55b7e
@ -308,7 +308,13 @@ int CSmmAPI::FormatIface(char iface[], unsigned int maxlength)
|
||||
for (i=length-1; i>=0; i--)
|
||||
{
|
||||
if (!isdigit(iface[i]))
|
||||
{
|
||||
if (i != length-1)
|
||||
{
|
||||
num = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( (num && ((int)maxlength <= length)) || (!num && ((int)maxlength <= length+3)) )
|
||||
@ -344,7 +350,7 @@ void *CSmmAPI::InterfaceSearch(CreateInterfaceFn fn, const char *iface, int max,
|
||||
break;
|
||||
if (num > max)
|
||||
break;
|
||||
} while ( num = FormatIface(_if, len) );
|
||||
} while ( num = FormatIface(_if, len+1) );
|
||||
|
||||
delete[] _if;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user