From 743f1e2e8c2baafbc68a1598502e012a08a64cf0 Mon Sep 17 00:00:00 2001 From: Digicrat Date: Fri, 26 Jul 2019 16:15:16 -0400 Subject: [PATCH] Fix bug wherein blank lines or trailing newlines causes parsing of user_db.csv to fail. --- srsepc/src/hss/hss.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsepc/src/hss/hss.cc b/srsepc/src/hss/hss.cc index fb7d79fd2..1df484802 100644 --- a/srsepc/src/hss/hss.cc +++ b/srsepc/src/hss/hss.cc @@ -110,7 +110,7 @@ bool hss::read_db_file(std::string db_filename) std::string line; while (std::getline(m_db_file, line)) { - if (line[0] != '#') { + if (line[0] != '#' && line.length() > 0) { uint column_size = 10; std::vector split = split_string(line, ','); if (split.size() != column_size) {