summaryrefslogtreecommitdiff
path: root/src/common/utils.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-08 05:59:19 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-08 05:59:19 +0000
commit1802aa4724ca002cf423927967c1fd05b432d882 (patch)
treeba7fbac0000911569075fcc2a37c6a24881178d2 /src/common/utils.c
parentbf247fbc543f033c4ef67d23f875a77a432608af (diff)
downloadhercules-1802aa4724ca002cf423927967c1fd05b432d882.tar.gz
hercules-1802aa4724ca002cf423927967c1fd05b432d882.tar.bz2
hercules-1802aa4724ca002cf423927967c1fd05b432d882.tar.xz
hercules-1802aa4724ca002cf423927967c1fd05b432d882.zip
Guild updates to the char server
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@507 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.c')
-rw-r--r--src/common/utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/common/utils.c b/src/common/utils.c
index 84570190f..2a09f773e 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -111,16 +111,15 @@ void str_lower(char *name)
// Allocate a StringBuf [MouseJstr]
struct StringBuf * StringBuf_Malloc()
{
- StringBuf * ret = (struct StringBuf *) malloc(sizeof(struct StringBuf));
+ struct StringBuf * ret = (struct StringBuf *) malloc(sizeof(struct StringBuf));
StringBuf_Init(ret);
return ret;
}
// Initialize a previously allocated StringBuf [MouseJstr]
-void StringBuf_Init(struct StringBuf * sbuf)
+void StringBuf_Init(struct StringBuf * sbuf) {
sbuf->max_ = 1024;
sbuf->ptr_ = sbuf->buf_ = (char *) malloc(sbuf->max_ + 1);
-{
}
// printf into a StringBuf, moving the pointer [MouseJstr]
@@ -177,12 +176,12 @@ void StringBuf_Destroy(struct StringBuf *sbuf)
void StringBuf_Free(struct StringBuf *sbuf)
{
StringBuf_Destroy(sbuf);
- free(sbuf)buf;
+ free(sbuf);
}
// Return the built string from the StringBuf [MouseJstr]
char * StringBuf_Value(struct StringBuf *sbuf)
{
*sbuf->ptr_ = '\0';
- return sbuf->base_;
+ return sbuf->buf_;
}