summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-30 12:08:39 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-30 12:08:39 +0000
commit7c9ae87b875bdbe03a82ef510495be6ef65d25ea (patch)
tree8c7e1ce948dece870e0b2c7c5a65204fd7453e32
parentfd435430623c01ec109f506c9afd1e3b46c03e7d (diff)
downloadhercules-7c9ae87b875bdbe03a82ef510495be6ef65d25ea.tar.gz
hercules-7c9ae87b875bdbe03a82ef510495be6ef65d25ea.tar.bz2
hercules-7c9ae87b875bdbe03a82ef510495be6ef65d25ea.tar.xz
hercules-7c9ae87b875bdbe03a82ef510495be6ef65d25ea.zip
* Added SV_READDB_MAX_FIELDS define for configuration of the sv_readdb limit.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14525 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/common/strlib.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 46223a3c0..7dff84ae5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2010/11/30
+ * Added SV_READDB_MAX_FIELDS define for configuration of the sv_readdb limit. [Ai4rei]
* Made skill_tree.txt reading use sv_readdb. [Ai4rei]
- Added define for skill entry requirements.
- Reports duplicate skills within same job class.
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 7a6c134e7..6a5643558 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -12,7 +12,7 @@
#include <errno.h>
-
+#define SV_READDB_MAX_FIELDS 63
#define J_MAX_MALLOC_SIZE 65535
// escapes a string in-place (' -> \' , \ -> \\ , % -> _)
@@ -923,7 +923,7 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
FILE* fp;
int lines = 0;
int entries = 0;
- char* fields[64]; // room for 63 fields ([0] is reserved)
+ char* fields[SV_READDB_MAX_FIELDS+1]; // room for SV_READDB_MAX_FIELDS fields ([0] is reserved)
int columns;
char path[1024], line[1024];