From 2345dfd6891b162e934b31c90fc0da04aa0611db Mon Sep 17 00:00:00 2001 From: zimoch Date: Wed, 3 Oct 2007 14:24:09 +0000 Subject: [PATCH] load dbd file only if not empty --- require.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/require.c b/require.c index 584da63..598a16d 100644 --- a/require.c +++ b/require.c @@ -154,9 +154,9 @@ int require(char* lib, char* version) loaded = getLibVersion(lib); /* load dbd file */ - if (stat(dbdname, &filestat) != ERROR) + if (stat(dbdname, &filestat) != ERROR && filestat.st_size > 0) { - /* If file exists */ + /* If file exists and is not empty */ printf("Loading %s\n", dbdname); if (dbLoadDatabase(dbdname, NULL, NULL) != OK) {