From 2568bad3cc1ae70350f5ad31e97b4c13194e437e Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 1 Feb 2012 13:43:47 +0000 Subject: sprintf() begone! Replaced with StringUtils' Printf() git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cEvent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/cEvent.cpp') diff --git a/source/cEvent.cpp b/source/cEvent.cpp index 4ed8f65f5..9b3ddcfdf 100644 --- a/source/cEvent.cpp +++ b/source/cEvent.cpp @@ -34,9 +34,9 @@ cEvent::cEvent(void) delete m_Event; m_bIsNamed = true; - char c_Str[64]; - sprintf(c_Str, "cEvent%p", this); - m_Event = sem_open( c_Str, O_CREAT, 777, 0 ); + AString EventName; + Printf(EventName, "cEvent%p", this); + m_Event = sem_open(EventName.c_str(), O_CREAT, 777, 0 ); if (m_Event == SEM_FAILED) { LOGERROR("cEvent: Cannot create event, errno = %i. Aborting server.", errno); -- cgit v1.2.3