From 7c9ae87b875bdbe03a82ef510495be6ef65d25ea Mon Sep 17 00:00:00 2001 From: ai4rei Date: Tue, 30 Nov 2010 12:08:39 +0000 Subject: * 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 --- src/common/strlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 - +#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]; -- cgit v1.2.3-70-g09d2