15 lines
492 B
Text
15 lines
492 B
Text
|
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++;
|