--- sash-3.4/utils.c.segf 2004-03-26 21:32:26.000000000 +0100 +++ sash-3.4/utils.c 2004-03-26 21:32:34.000000000 +0100 @@ -588,8 +588,7 @@ if (*text == ch) found = TRUE; } - - if (!found) + if (!found && retryPat != NULL) { pattern = retryPat; text = ++retryText; @@ -598,7 +597,7 @@ /* fall into next case */ case '?': - if (*text++ == '\0') + if (*text && *text++ == '\0') return FALSE; break;