mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
Fixed a CR/LF problem on Windows
This commit is contained in:
parent
af500f0ae4
commit
13acd78a39
@ -1,3 +1,7 @@
|
||||
2011-01-19 Werner Koch <wk@g10code.com>
|
||||
|
||||
* trustlist.c (read_one_trustfile): Also chop an CR.
|
||||
|
||||
2010-12-02 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpg-agent.c (CHECK_OWN_SOCKET_INTERVAL) [W32CE]: Set to 60
|
||||
|
@ -140,7 +140,8 @@ read_one_trustfile (const char *fname, int allow_include,
|
||||
{
|
||||
lnr++;
|
||||
|
||||
if (!*line || line[strlen(line)-1] != '\n')
|
||||
n = strlen (line);
|
||||
if (!n || line[n-1] != '\n')
|
||||
{
|
||||
/* Eat until end of line. */
|
||||
while ( (c=es_getc (fp)) != EOF && c != '\n')
|
||||
@ -151,7 +152,9 @@ read_one_trustfile (const char *fname, int allow_include,
|
||||
fname, lnr, gpg_strerror (err));
|
||||
continue;
|
||||
}
|
||||
line[strlen(line)-1] = 0; /* Chop the LF. */
|
||||
line[--n] = 0; /* Chop the LF. */
|
||||
if (n && line[n-1] == '\r')
|
||||
line[--n] = 0; /* Chop an optional CR. */
|
||||
|
||||
/* Allow for empty lines and spaces */
|
||||
for (p=line; spacep (p); p++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user