From b6bed14ff6dea601b0a80df320774d11e7a189c8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 1 Aug 2011 10:02:31 -0500 Subject: [PATCH] make strdup NULL return strdup("") in sqlite for mac bug --- libs/sqlite/src/sqliteInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sqlite/src/sqliteInt.h b/libs/sqlite/src/sqliteInt.h index 3686a091e7..f2914f6230 100644 --- a/libs/sqlite/src/sqliteInt.h +++ b/libs/sqlite/src/sqliteInt.h @@ -297,7 +297,7 @@ static inline char *strndup_lite(const char *s, size_t n) #define sqliteMalloc(x) zmalloc(x)//sqlite3Malloc(x,1) #define sqliteMallocRaw(x) malloc(x)//sqlite3MallocRaw(x,1) #define sqliteRealloc(x,y) realloc(x, y)//sqlite3Realloc(x,y) -#define sqliteStrDup(x) (x?strdup(x):NULL)//sqlite3StrDup(x) +#define sqliteStrDup(x) (x?strdup(x):strdup(""))//sqlite3StrDup(x) #define sqliteStrNDup(x,y) strndup_lite(x,y) //sqlite3StrNDup(x,y) #define sqliteReallocOrFree(x,y) sqlite3ReallocOrFree(x,y)