CUtlString::operator+=
0x00b814d0 · 197 bytes · __thiscall
_ZN10CUtlStringpLERKS_
Decompiled
undefined (2 params)
/* CUtlString::TEMPNAMEPLACEHOLDERVALUE(CUtlString const&) */
CUtlString * __thiscall CUtlString::operator+=(CUtlString *this,CUtlString *param_1)
{
int iVar1;
size_t __n;
size_t sVar2;
undefined1 *__src;
int iVar3;
int local_20;
if (*(int *)(this + 0xc) == 0) {
local_20 = 0;
}
else {
local_20 = *(int *)(this + 0xc) + -1;
}
sVar2 = *(int *)(param_1 + 0xc) - 1;
if (*(int *)(param_1 + 0xc) == 0) {
sVar2 = 0;
}
iVar1 = 0;
if (0 < (int)(local_20 + sVar2)) {
iVar1 = local_20 + sVar2 + 1;
}
CUtlBinaryBlock::SetLength((CUtlBinaryBlock *)this,iVar1);
iVar1 = *(int *)(this + 0xc);
if (iVar1 == 0) {
iVar3 = 0;
}
else {
iVar3 = iVar1 + -1;
}
__n = iVar3 - local_20;
if ((int)sVar2 < iVar3 - local_20) {
__n = sVar2;
}
__src = &DAT_00d539c2;
if (*(int *)(param_1 + 0xc) != 0) {
__src = *(undefined1 **)param_1;
}
if (iVar1 == 0) {
CUtlBinaryBlock::SetLength((CUtlBinaryBlock *)this,1);
**(undefined1 **)this = 0;
}
memcpy((void *)(local_20 + *(int *)this),__src,__n);
*(undefined1 *)(*(int *)this + iVar3) = 0;
return this;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.