From fe9d3ea8fa7ef4d4385edd93bf19de46d218135e Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 7 May 2000 23:37:30 +0000 Subject: Fixed an off by 2 error. 2000-05-07 Christopher James Lahey * backend/pas/pas-backend-file.c: Fixed an off by 2 error. svn path=/trunk/; revision=2889 --- addressbook/backend/pas/pas-backend-file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addressbook/backend/pas') 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; -- cgit