Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2011, 04:36 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default SprintF

When did this start crapping out ? I am in my second day of C++ mental bombardment and reading old post I though this would work. Not exactly what I was trying to do, but right now just narrowing down my error.

Code:
sprintf("%c",0x12);
Code:
questmgr.cpp:1108: error: invalid conversion from âintâ to âconst char*â
questmgr.cpp:1108: error:   initializing argument 2 of âint sprintf(char*, const char*, ...)â
Reply With Quote
  #2  
Old 11-27-2011, 05:20 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Nevermind, obviously I needed to RTFM.
Reply With Quote
  #3  
Old 12-04-2011, 02:36 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

Quote:
Originally Posted by provocating View Post
Nevermind, obviously I needed to RTFM.
At no point should you be using sprintf.

http://msdn.microsoft.com/en-us/library/bb288454.aspx

sprintf (and a host of other function calls) are at the root of essentially every buffer overflow.

banned.h and strsafe.h are your friends.
Reply With Quote
  #4  
Old 12-04-2011, 02:41 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Well I got it from questmgr.cpp

I just did a quick ctr-f and found a ton of them in there, /shrug.

In the end it did not matter, the code I added did not need it anyway.
Reply With Quote
Reply


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 10:02 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3