From 0891928183475e3abec093ffdc66d1505a510f04 Mon Sep 17 00:00:00 2001 From: joncruz Date: Sun, 14 May 2006 07:09:55 +0000 Subject: [PATCH] Fixing hash sort for null --- src/extension/db.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/extension/db.h b/src/extension/db.h index 264e76539..c67a62bf2 100644 --- a/src/extension/db.h +++ b/src/extension/db.h @@ -29,7 +29,13 @@ private: to find the different extensions in the hash map. */ struct ltstr { bool operator()(const char* s1, const char* s2) const { - return strcmp(s1, s2) < 0; + if ( (s1 == NULL) && (s2 != NULL) ) { + return true; + } else if (s1 == NULL || s2 == NULL) { + return false; + } else { + return strcmp(s1, s2) < 0; + } } }; /** This is the actual database. It has all of the modules in it, -- 2.30.2