Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
function MyMethod(optional string ExtraPar = "ABCD");
 
....
 
function CrashTheGame()
{
	//this will crash with a buffer overlow; "ABCDEF" is longer thatthan "ABCD"
	MyMethod("ABCDEF");
}
function EverythingIsOkay()
{
	//this won't crash; "ABC" is shorter than "ABCD"
	MyMethod("ABC");

}

...