diff --git a/CHANGES b/CHANGES index 79eceb5..43a2de5 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,8 @@ Changes in 0.29: a "recvfrom: Interrupted system call" log message if signals arrive at a particularly inopportune moment. + Fix a macro substitution bug (thanks to Richard Nyberg.) + Changes in 0.28: Fix stupid one-liner bug which broke standalone mode (-l). diff --git a/Makefile b/Makefile index 680f26f..dd860e6 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ distclean: localdistclean $(patsubst %, %.distclean, $(SUB)) localdistclean: localclean rm -f MCONFIG config.status config.log acconfig.h *~ \#* rm -rf *.cache - find . -type f \( -name \*.orig -o -name \*.rej \) | xargs -r rm -f + find . -type f \( -name \*.orig -o -name \*.rej \) | xargs rm -f spotless: distclean rm -f configure acconfig.h.in @@ -56,7 +56,7 @@ acconfig.h: MCONFIG # autoconf and autoheader. acconfig.h.in: configure.in configure aclocal.m4 rm -f acconfig.h.in acconfig.h - autoheader -f + autoheader configure: configure.in aclocal.m4 rm -f MCONFIG configure config.log acconfig.h config.cache diff --git a/tftpd/remap.c b/tftpd/remap.c index 786699f..6534b01 100644 --- a/tftpd/remap.c +++ b/tftpd/remap.c @@ -78,6 +78,8 @@ static int genmatchstring(char *string, const char *pattern, const char *input, if ( macrosub && (sublen = macrosub(macro, string)) >= 0 ) { len += sublen; + if ( string ) + string += sublen; } else { len++; if ( string )