View Single Post
  #5  
Old 01-27-2009, 12:51 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by Loriel View Post
I am probably missing something here, but why would you ever call functions outside of function blocks?

(Also I assume this is for debugging?)
In a normal situation, reliable scripters do not do such a thing. However, malicious ones tend to add weapons to themselves using scripts that usually have methods called outside of a function block. Chris is attempting to secure his code with a simple check of the call stack, but this is a problem since the method is called on a global scope.

Chris, why not just eliminate the possibility of a weapon addition on a global scope (or, consequently, through the weapon itself) by only allowing calls that have a total stack size of >1?
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote