L L4D2node

V_StringToIntArray

0x0004b680 · 203 bytes · __cdecl

_Z18V_StringToIntArrayPiiPKc

Decompiled

undefined (3 params)

/* V_StringToIntArray(int*, int, char const*) */

void V_StringToIntArray(int *param_1,int param_2,char *param_3)

{
  byte bVar1;
  long lVar2;
  int iVar3;
  byte *__dest;
  int iVar4;
  int in_GS_OFFSET;
  byte local_a0;
  byte local_9f [126];
  undefined1 local_21;
  int local_20;
  
  __dest = &local_a0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  strncpy((char *)__dest,param_3,0x80);
  local_21 = 0;
  if (0 < param_2) {
    iVar4 = 0;
    do {
      lVar2 = strtol((char *)__dest,(char **)0x0,10);
      param_1[iVar4] = lVar2;
      bVar1 = *__dest;
      while ((bVar1 & 0xdf) != 0) {
        __dest = __dest + 1;
        bVar1 = *__dest;
      }
      iVar3 = iVar4;
      if (bVar1 == 0) break;
      iVar4 = iVar4 + 1;
      __dest = __dest + 1;
      iVar3 = param_2;
    } while (iVar4 != param_2);
    iVar3 = iVar3 + 1;
    if (iVar3 < param_2) {
      do {
        param_1[iVar3] = 0;
        iVar3 = iVar3 + 1;
      } while (iVar3 != param_2);
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)