engine: common: lib_common: fix offset by one UB

This commit is contained in:
Alibek Omarov 2023-02-17 22:51:56 +03:00
parent 58e95c7d6f
commit fb0f184d6b
1 changed files with 3 additions and 1 deletions

View File

@ -410,11 +410,13 @@ char **COM_ConvertToLocalPlatform( EFunctionMangleType to, const char *from, siz
if( at ) len = (uint)( at - prev );
else len = (uint)Q_strlen( prev );
Q_strncpy( symbols[i], prev, Q_min( len + 1, sizeof( symbols[i] )));
prev = at + 1;
if( !at )
break;
prev = at + 1;
}
if( i == MAX_NESTED_NAMESPACES )