From c2f5eb71b6a10c0105e1127f49e0e5fad890a20e Mon Sep 17 00:00:00 2001 From: "Chris West (Faux)" Date: Mon, 27 Jun 2016 12:33:31 +0000 Subject: [PATCH] #247: cope with settings-as-files having been dos2unix'd --- windows/winstore.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/windows/winstore.c b/windows/winstore.c index 9771a0af7..746987ad5 100644 --- a/windows/winstore.c +++ b/windows/winstore.c @@ -1060,6 +1060,12 @@ void *file_open_settings_r(const char *sessionname) if (!p) break; *p = '\0'; ++p; + + // allow for someone having dos2unix'd our file + if (*p == '\r') + ++p; + + assert('\n' == *p); ++p; /* for "\\\n" - human readable files */ st2 = snew( struct setItem );