$OpenBSD: patch-libtc_tcglob_c,v 1.1 2010/01/11 08:49:27 jakemsr Exp $

don't try to access tcg->glob.gl_pathv[-1]

--- libtc/tcglob.c.orig	Wed Jan  6 00:58:04 2010
+++ libtc/tcglob.c	Wed Jan  6 01:00:55 2010
@@ -77,8 +77,7 @@ const char *tc_glob_next(TCGlob *tcg)
     if (tcg != NULL) {
         if (tcg->current == -1) {
             ret = tcg->pattern;
-        }
-        if (tcg->current < tcg->glob.gl_pathc) {
+        } else if (tcg->current < tcg->glob.gl_pathc) {
             ret = tcg->glob.gl_pathv[tcg->current];
         }
         tcg->current++;
