diff --git a/rpmio/macro.c b/rpmio/macro.c index ef5ae30..47ab5ea 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1690,8 +1690,12 @@ rpmInitMacrofileGlob (const char *macrofile) continue; for (; *p; ++p) - if (!xisalnum (*p) && ('_' != *p) && ('-' != *p)) - break; + if (!xisalnum (*p)) { + if (('_' != *p) && ('-' != *p)) + break; + if (p[1] == '\0') + break; + } if (!*p) rpmInitMacrofile (gl.gl_pathv[i]); }