CUtlString::operator+=
0x0004f670 · 168 bytes · __thiscall
_ZN10CUtlStringpLEPKc
Decompiled
undefined (2 params)
/* CUtlString::TEMPNAMEPLACEHOLDERVALUE(char const*) */
CUtlString * __thiscall CUtlString::operator+=(CUtlString *this,char *param_1)
{
size_t __n;
int iVar1;
int iVar2;
if (*(int *)(this + 0xc) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(this + 0xc) + -1;
}
__n = _V_strlen(param_1);
iVar1 = 0;
if (0 < (int)(__n + iVar2)) {
iVar1 = __n + iVar2 + 1;
}
CUtlBinaryBlock::SetLength((CUtlBinaryBlock *)this,iVar1);
if (*(int *)(this + 0xc) == 0) {
if (-__n == iVar2 || -iVar2 < (int)__n) {
__n = -iVar2;
}
iVar1 = 0;
CUtlBinaryBlock::SetLength((CUtlBinaryBlock *)this,1);
**(undefined1 **)this = 0;
}
else {
iVar1 = *(int *)(this + 0xc) + -1;
if (iVar1 - iVar2 <= (int)__n) {
__n = iVar1 - iVar2;
}
}
memcpy((void *)(iVar2 + *(int *)this),param_1,__n);
*(undefined1 *)(*(int *)this + iVar1) = 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.