diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-27 16:29:44 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-27 16:29:44 +0000 |
commit | b14ce328eaf0c82dff32ba156ec440ff1a07ac0d (patch) | |
tree | 2da3e570dda7049d4cca85c5b43e1c02577997bc /src/common/utils.c | |
parent | 99b156f4ec91f2d52fd57aa1710ae9261b8db356 (diff) | |
download | hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.gz hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.bz2 hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.xz hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.zip |
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.c')
-rw-r--r-- | src/common/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/utils.c b/src/common/utils.c index ccc81c1c5..9a7722478 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdarg.h> #include <stdlib.h> +#include "malloc.h" void dump(unsigned char *buffer, int num) { @@ -142,7 +143,7 @@ int StringBuf_Printf(struct StringBuf *sbuf,const char *fmt,...) /* Else try again with more space. */ sbuf->max_ *= 2; // twice the old size off = sbuf->ptr_ - sbuf->buf_; - sbuf->buf_ = (char *) realloc(sbuf->buf_, sbuf->max_ + 1); + sbuf->buf_ = (char *) aRealloc(sbuf->buf_, sbuf->max_ + 1); sbuf->ptr_ = sbuf->buf_ + off; } } @@ -156,7 +157,7 @@ int StringBuf_Append(struct StringBuf *buf1,const struct StringBuf *buf2) if (size2 >= buf1_avail) { int off = buf1->ptr_ - buf1->buf_; buf1->max_ += size2; - buf1->buf_ = (char *) realloc(buf1->buf_, buf1->max_ + 1); + buf1->buf_ = (char *) aRealloc(buf1->buf_, buf1->max_ + 1); buf1->ptr_ = buf1->buf_ + off; } |