From a5a07d79a552f34b13880c9a1f9eebbdabe7dd2e Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 30 Oct 2010 23:39:40 +0100 Subject: Fix %M macro to make it work with commands not ending in itself --- blasms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blasms.c b/blasms.c index d9e10dc..7aed511 100644 --- a/blasms.c +++ b/blasms.c @@ -329,8 +329,8 @@ int main(int argc, char *argv[]) { } replacestr(systemcmd, i, 2, telnum); - replacestr(systemcmd, strlen(systemcmd) - 1, 0, ":"); - replacestr(systemcmd, strlen(systemcmd) - 1, 0, line + telnumlen); + replacestr(systemcmd, i + strlen(telnum), 0, ":"); + replacestr(systemcmd, i + strlen(telnum) + 1, 0, line + telnumlen); break; } -- cgit v1.2.3