core: Really remove CR from version output.

* src/version.c (_gpgme_get_program_version): Fix test.
--

Fixes-commit: 6bde056355
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2018-10-16 17:05:14 +02:00
parent 233d2f3d35
commit d63d6d8b80
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -338,7 +338,7 @@ _gpgme_get_program_version (const char *const file_name)
mark = strchr (&line[linelen], '\n');
if (mark)
{
if (mark > &line[0] && *mark == '\r')
if (mark > &line[0] && mark[-1] == '\r')
mark--;
*mark = '\0';
break;