mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
Merged dev changes 10/24/2019
- Applied the nexttoken security fix (suggested by ficool2, important for MP port, no #ifdef MAPBASE because of volume of changes and irrelevance to readers) - Fixed a crash with the follower wait point start/stop using handlers - Fixed game_ui activator crash - Changed vphysics triggers to accept more entities - Fixed player squadmates not obeying hint node facing (e.g. wait points) - Fixed npc_snipers - prop_vehicle_jeep_old no longer changes classname - Restored and added the other CTakeDamageInfo fields for point_damageinfo - Fixed game_metadata not saving correctly - Fixed logic_measure_movement not functioning while possessing spawnflags - Added scripts/mapbase_rpc.txt script with choosable app ID and game image - Fixed some casing that broke Linux support - Added proper WorldVertexTransition blending to translucency and selfillum (translucency may need the translucent texture to be $basetexture, not $basetexture2) - Added modified parallax corrected cubemaps to shader code (although currently unusable) - Fixed Variant_ParseInput - Added/restored custom scanner speed (experimental, needs more work) - Several miscellaneous code changes/fixes and comment adjustments
This commit is contained in:
@@ -747,11 +747,14 @@ CBaseEntity *CEntitySphereQuery::GetCurrentEntity()
|
||||
// sep - Character to use as separator. UNDONE: allow multiple separator chars
|
||||
// Output : Returns a pointer to the next token to be parsed.
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *nexttoken(char *token, const char *str, char sep)
|
||||
const char *nexttoken(char *token, const char *str, char sep, size_t tokenLen)
|
||||
{
|
||||
if ((str == NULL) || (*str == '\0'))
|
||||
{
|
||||
*token = '\0';
|
||||
if(tokenLen)
|
||||
{
|
||||
*token = '\0';
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -759,11 +762,25 @@ const char *nexttoken(char *token, const char *str, char sep)
|
||||
// Copy everything up to the first separator into the return buffer.
|
||||
// Do not include separators in the return buffer.
|
||||
//
|
||||
while ((*str != sep) && (*str != '\0'))
|
||||
while ((*str != sep) && (*str != '\0') && (tokenLen > 1))
|
||||
{
|
||||
*token++ = *str++;
|
||||
tokenLen--;
|
||||
}
|
||||
|
||||
//
|
||||
// If token is to big for return buffer, skip rest of token.
|
||||
//
|
||||
while ((*str != sep) && (*str != '\0'))
|
||||
{
|
||||
str++;
|
||||
}
|
||||
|
||||
if(tokenLen)
|
||||
{
|
||||
*token = '\0';
|
||||
tokenLen--;
|
||||
}
|
||||
*token = '\0';
|
||||
|
||||
//
|
||||
// Advance the pointer unless we hit the end of the input string.
|
||||
|
||||
Reference in New Issue
Block a user