From 9ce4dd5c57a5de7dace3059e3164cfd0f0e89044 Mon Sep 17 00:00:00 2001 From: Chris Toshok <toshok@src.gnome.org> Date: Mon, 8 May 2000 01:48:28 +0000 Subject: comment function, and fix an ABR. * ename/e-name-western.c (e_name_western_extract_middle): comment function, and fix an ABR. svn path=/trunk/; revision=2894 --- addressbook/ename/e-name-western.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'addressbook/ename') diff --git a/addressbook/ename/e-name-western.c b/addressbook/ename/e-name-western.c index 755d7eabed..057afdacc1 100644 --- a/addressbook/ename/e-name-western.c +++ b/addressbook/ename/e-name-western.c @@ -300,13 +300,16 @@ e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs) middle_idx = idxs->first_idx + strlen (name->first) + 1; + if (middle_idx > strlen (name->full)) + return; + + /* + * Search for the first space (or the terminating \0) + */ while (isspace (name->full [middle_idx]) && name->full [middle_idx] != '\0') middle_idx ++; - if (middle_idx > strlen (name->full)) - return; - if (name->full [middle_idx] == '\0') return; -- cgit