shared: end string with % if one was found at the end of a expandible string (#6828)
authorFelipe Sateler <fsateler@users.noreply.github.com>
Thu, 14 Sep 2017 17:51:20 +0000 (14:51 -0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 17:51:19 +0000 (19:51 +0200)
commit038492aed3e0293fd9cf4998fd891addb597b954
treefb5b8d7eb7c445850e10d666185f549ffa4a64c2
parent8b5c528ce8823b723178e9ebb552e19b83fbc7a9
shared: end string with % if one was found at the end of a expandible string (#6828)

Current behavior is that %X where X is an unidentified specifier, then the result is
the same %X string. This was not the case when the string ended with a stray %, where
the character would have not been output. Lets add that missing character.

Fixes: #6374
src/shared/specifier.c
src/test/test-unit-name.c