mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACS: Allocate user properties with PU_LEVEL
This commit is contained in:
parent
f8744560df
commit
48f7d53cd8
1 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ void K_UserPropertyPush(mapUserProperties_t *user, const char *key, mapUserPrope
|
||||||
user->properties = (mapUserProperty_t *)Z_ReallocAlign(
|
user->properties = (mapUserProperty_t *)Z_ReallocAlign(
|
||||||
user->properties,
|
user->properties,
|
||||||
sizeof(mapUserProperty_t) * user->capacity,
|
sizeof(mapUserProperty_t) * user->capacity,
|
||||||
PU_STATIC, // PU_LEVEL
|
PU_LEVEL,
|
||||||
NULL,
|
NULL,
|
||||||
sizeof(mapUserProperty_t) * 8
|
sizeof(mapUserProperty_t) * 8
|
||||||
);
|
);
|
||||||
|
|
@ -54,7 +54,7 @@ void K_UserPropertyPush(mapUserProperties_t *user, const char *key, mapUserPrope
|
||||||
|
|
||||||
prop = &user->properties[ user->length ];
|
prop = &user->properties[ user->length ];
|
||||||
|
|
||||||
prop->key = Z_Malloc(keyLength + 1, PU_STATIC, NULL);
|
prop->key = Z_Malloc(keyLength + 1, PU_LEVEL, NULL);
|
||||||
M_Memcpy(prop->key, key, keyLength + 1);
|
M_Memcpy(prop->key, key, keyLength + 1);
|
||||||
prop->key[keyLength] = '\0';
|
prop->key[keyLength] = '\0';
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ void K_UserPropertyPush(mapUserProperties_t *user, const char *key, mapUserPrope
|
||||||
const char *string = *(const char **)value;
|
const char *string = *(const char **)value;
|
||||||
const size_t stringLength = strlen(string);
|
const size_t stringLength = strlen(string);
|
||||||
|
|
||||||
prop->valueStr = Z_Malloc(stringLength + 1, PU_STATIC, NULL);
|
prop->valueStr = Z_Malloc(stringLength + 1, PU_LEVEL, NULL);
|
||||||
M_Memcpy(prop->valueStr, string, stringLength + 1);
|
M_Memcpy(prop->valueStr, string, stringLength + 1);
|
||||||
prop->valueStr[stringLength] = '\0';
|
prop->valueStr[stringLength] = '\0';
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue