From f84acc0e3441d09c0b5026f97c3e4cbbc0067256 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 2 Dec 2017 10:46:46 +0100 Subject: [PATCH] Avoid asserting when reading the session file Fixes #10824. --- src/Session.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Session.cpp b/src/Session.cpp index 009bf39cf1..eb0fc64829 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -507,8 +507,7 @@ void ShellEscapeSection::read(istream & is) if (c == '[') break; getline(is, s); - c = s[0]; - if (c == 0 || c == '#' || c == ' ' || !FileName::isAbsolute(s)) + if (s.empty() || s[0] == '#' || s[0] == ' ' || !FileName::isAbsolute(s)) continue; // read shellescape files -- 2.39.5