Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void * (__fastcall *CNWSScriptVarTable__GetStringNext)(CNWSScriptVarTable * pThis, void*, void *a2, CExoString *str);
- void * __fastcall CNWSScriptVarTable__GetString(CNWSScriptVarTable * pThis, void*, void *a2, CExoString *str){
- if (!str || !str->text){
- CExoString * str = (CExoString*)a2;
- if (!str){
- str = (CExoString*)lua.mem.nwnx_malloc(sizeof(CExoString));
- }
- memset(str, 0, sizeof(CExoString));
- return str;
- }
- else if (strncmp(str->text, "LUA!", 4) == 0){
- char * request = strstr(str->text, "!")+1;
- char * params = strstr(request, "!");
- *params = '\0';
- params++;
- char * back = lua.OnGetString(request, params);
- CExoString * str = (CExoString*)a2;// lua.mem.nwnx_malloc(sizeof(CExoString));
- if (!str){
- str = (CExoString*)lua.mem.nwnx_malloc(sizeof(CExoString));
- }
- memset(str, 0, sizeof(CExoString));
- if (back){
- str->text = back;
- str->len = strlen(back);
- }
- //lua.Log("o %08X = %s\n", str, str->text);
- return str;
- }
- return CNWSScriptVarTable__GetStringNext(pThis, NULL, a2, str);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement