summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 05:27:03 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 05:27:03 +0000
commit34f200c644ba8598448e20f4aa69a504e55d3c8f (patch)
treea812ecfcfad219d17855da956578b7ad83c88aa2 /src/common
parent1d96525d00110de78f02decfd31f106f99ce9c73 (diff)
downloadhercules-34f200c644ba8598448e20f4aa69a504e55d3c8f.tar.gz
hercules-34f200c644ba8598448e20f4aa69a504e55d3c8f.tar.bz2
hercules-34f200c644ba8598448e20f4aa69a504e55d3c8f.tar.xz
hercules-34f200c644ba8598448e20f4aa69a504e55d3c8f.zip
- Change strncpy to memcpy when parsing switches in the script engine since it's guaranteed to be a word of that size (skip_word).
- Made scriptlabel_db duplicate the key. When str_buf is reallocated, the keys in scriptlabel_db could become invalid, causing a crash in npc_convertlabel_db. ( removed the readded >=0x81 equivalent ) - Now npc_convertlabel_db clears scriptlabel_db after using it. - parse_script has an extra parameter options. At the moment it only indicates if scriptlabel_db should be used or not. - Fixed "UINT_MAX undeclared" on systems that don't declare it in limits.h git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9557 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cbasetypes.h4
-rw-r--r--src/common/db.h2
-rw-r--r--src/common/timer.c6
3 files changed, 9 insertions, 3 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index c61424191..3a3bde818 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -126,6 +126,10 @@ typedef unsigned int uint32;
#define SINT16_MAX ((sint16)0x7FFF)
#define SINT32_MAX ((sint32)0x7FFFFFFF)
+// ILP64 isn't supported, so always 32 bits?
+#ifndef UINT_MAX
+#define UINT_MAX 0xFFFFFFFF
+#endif
//////////////////////////////////////////////////////////////////////////
// Integers with guaranteed _minimum_ size.
diff --git a/src/common/db.h b/src/common/db.h
index aa165acd7..a79c88822 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -130,7 +130,7 @@ typedef enum {
* @see #db_default_release(DBType,DBOptions)
* @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
*/
-typedef enum {
+typedef enum db_opt {
DB_OPT_BASE = 0,
DB_OPT_DUP_KEY = 1,
DB_OPT_RELEASE_KEY = 2,
diff --git a/src/common/timer.c b/src/common/timer.c
index cf71f2ffc..63a06acc2 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -18,9 +18,11 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
#include "timer.h"
-#include "malloc.h"
-#include "showmsg.h"
// タイマー間隔の最小値。モンスターの大量召還時、多数のクライアント接続時に
// サーバーが反応しなくなる場合は、TIMER_MIN_INTERVAL を増やしてください。