Raised This Month: $ Target: $400
 0% 

Strings and buffer overflows? (strcopy, StrCat)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
]FUSION[ Gray Death
Member
Join Date: Mar 2004
Location: Hamburg / Germany
Old 09-15-2007 , 18:45   Re: Strings and buffer overflows? (strcopy, StrCat)
Reply With Quote #5

Oh dear... Another three hours of my life. That comes from learning by copy 'n' paste and rolling the dice:

Code:
public Action:HookRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
  if ...
  {
    ServerCommand("changelevel \"%s\"", g_nextmap);
    return Plugin_Stop;
  }
  return Plugin_Handled;
}
After I added retrun Plugin_Stop, the compiler warns me, that maybe HookRoundStart needs an return. So I just copied added some return strtring at the end of the function. And obviously - at least together with the Plugin_Handled Constant - it was a really bad idea. :-) But If you like to double your trash boxes on cs_office each round, then try. ;)
]FUSION[ Gray Death is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode