diff options
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/ename/e-name-western.c | 9 | ||||
-rw-r--r-- | e-util/ename/e-name-western.c | 9 |
3 files changed, 17 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 4a73b5d248..8f37c1388b 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2000-05-07 Chris Toshok <toshok@helixcode.com> + * ename/e-name-western.c (e_name_western_extract_middle): comment + function, and fix an ABR. + +2000-05-07 Chris Toshok <toshok@helixcode.com> + * ename/e-name-western.c (e_name_western_cleanup_string): comment function, and fix an ABR. 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; diff --git a/e-util/ename/e-name-western.c b/e-util/ename/e-name-western.c index 755d7eabed..057afdacc1 100644 --- a/e-util/ename/e-name-western.c +++ b/e-util/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; |