4c9460
From 817959609b95afe34ce0f7f6c3dc5d7d0d9a8470 Mon Sep 17 00:00:00 2001
4c9460
From: Panu Matilainen <pmatilai@redhat.com>
4c9460
Date: Wed, 25 Jun 2014 11:28:02 +0300
4c9460
Subject: [PATCH] Handle line continuation in grabArgs() (related to
4c9460
 RhBug:1045723)
4c9460
4c9460
- Commit 1bdcd0500865efd3566efd7f951228f69b58e755 to fix RhBug:1045723
4c9460
  broke some funky java macros in Fedora which include line continuation
4c9460
  in the argument (comments 6-7 in the bug). That it ever worked seems
4c9460
  far more like luck than by design but since this seems to fix it...
4c9460
---
4c9460
 rpmio/macro.c | 3 ++-
4c9460
 1 file changed, 2 insertions(+), 1 deletion(-)
4c9460
4c9460
diff --git a/rpmio/macro.c b/rpmio/macro.c
4c9460
index 12a65a4..b00155c 100644
4c9460
--- a/rpmio/macro.c
4c9460
+++ b/rpmio/macro.c
4c9460
@@ -771,7 +771,8 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se,
4c9460
 
4c9460
 exit:
4c9460
     argvFree(argv);
4c9460
-    return (*lastc == '\0' || *lastc == '\n') ? lastc : lastc + 1;
4c9460
+    return ((*lastc == '\0' || *lastc == '\n') && *(lastc-1) != '\\') ?
4c9460
+	   lastc : lastc + 1;
4c9460
 }
4c9460
 
4c9460
 /**
4c9460
-- 
4c9460
2.1.0
4c9460