Fix bug wherein blank lines or trailing newlines causes parsing of user_db.csv to fail.

master
Digicrat 5 years ago committed by Andre Puschmann
parent 635752c42e
commit 86ec3101e0

@ -110,7 +110,7 @@ bool hss::read_db_file(std::string db_filename)
std::string line; std::string line;
while (std::getline(m_db_file, line)) { while (std::getline(m_db_file, line)) {
if (line[0] != '#') { if (line[0] != '#' && line.length() > 0) {
uint column_size = 10; uint column_size = 10;
std::vector<std::string> split = split_string(line, ','); std::vector<std::string> split = split_string(line, ',');
if (split.size() != column_size) { if (split.size() != column_size) {

Loading…
Cancel
Save