summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpmio/macro.c2
-rw-r--r--tests/rpmmacro.at5
2 files changed, 6 insertions, 1 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 0e63f68a4..35d896049 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -925,7 +925,7 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se,
splitQuoted(&argv, s, " \t");
free(s);
- cont = ((*lastc == '\0' || *lastc == '\n') && *(lastc-1) != '\\') ?
+ cont = (*lastc == '\0') || (*lastc == '\n' && *(lastc-1) != '\\') ?
lastc : lastc + 1;
}
diff --git a/tests/rpmmacro.at b/tests/rpmmacro.at
index c67d96ede..873783153 100644
--- a/tests/rpmmacro.at
+++ b/tests/rpmmacro.at
@@ -179,6 +179,9 @@ runroot rpm \
--eval '%foo %{quote: 2 3 5} %{quote:%{nil}}' \
--eval '%foo x%{quote:y}z 123' \
--eval '%foo x%{quote:%{nil}}z' \
+ --eval '%foo 1 \
+bar' \
+ --eval '%foo 1 \' \
],
[0],
[1:"1"
@@ -190,6 +193,8 @@ runroot rpm \
2:" 2 3 5" ""
2:"xyz" "123"
1:"xz"
+2:"1" "\"bar
+2:"1" "\"
])
AT_CLEANUP