aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog4
-rw-r--r--addressbook/backend/pas/pas-backend-file.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 49f6c4463a..b5f01fc7e2 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-07 Christopher James Lahey <clahey@helixcode.com>
+
+ * backend/pas/pas-backend-file.c: Fixed an off by 2 error.
+
2000-05-07 Chris Toshok <toshok@helixcode.com>
* gui/component/addressbook.c (set_prop): don't create a new
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 2dbd27a89a..02964ffe6b 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -415,6 +415,9 @@ pas_backend_file_search (PASBackendFile *bf,
DBT id_dbt, vcard_dbt;
int i;
+ if (!bf->priv->loaded)
+ return;
+
view->search_sexp = e_sexp_new();
view->search_context = g_new0(PASBackendFileSearchContext, 1);
@@ -436,7 +439,7 @@ pas_backend_file_search (PASBackendFile *bf,
while (db_error == 0) {
/* don't include the version in the list of cards */
- if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME + 1)
+ if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME) + 1
|| strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) {
char *vcard_string = vcard_dbt.data;