20.02.2014, 18:19
Thanks for the links, ****** showed only @emit one. Zeex writes awesome stuff, but with zero commentary.
Back to y_va: I dumped the stack right before sysreq:
For Fun and NoFun:
Then I tried to get the string passed as first parameter (16528 and 16236). The Fun string got echoed correctly, but the second one:
0x00003f6c == 16236
Does it have anything to do with STK pointer manipulation done earlier?
Any help welcome, I'm tinkering 2 days now.
#e: Minor dent:
Works as intended. 16256 is address of str from previous frame. Now I have some direction, but still a little clueless
Back to y_va: I dumped the stack right before sysreq:
Quote:
16 16528 64 8 28 79 0 0 0 0 |
Quote:
24 16236 64 96 144 168 196 79 0 0 |
pawn Код:
Fun(str, sizeof str, "HI%s", "Folks");
NoFun(str, sizeof str, "Hello%s%s%s", "Folks", "JOKERS", "Temporary");
Quote:
[20:03:54] [debug] Run time error 5: "Invalid memory access" [20:03:54] [debug] AMX backtrace: [20:03:54] [debug] #0 00000318 in va_format (out[]=@0x00003f6c "Used to be", size=64, fmat[]=@0x00000060 "Hello%s%s%s", va_:STATIC_ARGS=3) at D:\Programming\Pawn\NSSRP\gamemodes\dickbutt.pwn:8 6 [20:03:54] [debug] #1 00000214 in NoFun (out[]=@0x00000318 "", size=64, fmat[]=@0x00000060 "Hello%s%s%s", ... <4049 arguments>) at D:\Programming\Pawn\NSSRP\gamemodes\dickbutt.pwn:3 4 [20:03:54] [debug] #2 00000120 in main () at D:\Programming\Pawn\NSSRP\gamemodes\dickbutt.pwn:2 4 [20:03:54] Script[gamemodes/dickbutt.amx]: Run time error 5: "Invalid memory access" |
Does it have anything to do with STK pointer manipulation done earlier?
Any help welcome, I'm tinkering 2 days now.
#e: Minor dent:
pawn Код:
#emit PUSH.S fmat
#emit PUSH.S size
#emit PUSH 16256
#emit PUSH YSI_g_sArgCount // Push the parameter count.
#emit SYSREQ.C format