summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNullspoon <nullspoon@iohq.net>2014-08-06 22:42:31 -0600
committerNullspoon <nullspoon@iohq.net>2014-08-06 22:42:31 -0600
commitcff05ab6b574aabf4a2df54149e7fde87a19dcf6 (patch)
treeba6c7845729f81d8e9ff05e3c21fe972e19f3097
parent412248d17e24e2399c14b328113286ba50356201 (diff)
downloadnoteless-cff05ab6b574aabf4a2df54149e7fde87a19dcf6.tar.gz
noteless-cff05ab6b574aabf4a2df54149e7fde87a19dcf6.tar.xz
Added config support for empty lines
Forgot to take into account empty lines in config files. Not a problem now!
-rw-r--r--src/lib/config.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/config.cpp b/src/lib/config.cpp
index 2558cb7..dfb78ca 100644
--- a/src/lib/config.cpp
+++ b/src/lib/config.cpp
@@ -69,6 +69,9 @@ int config::parse_line( string line ) {
}
}
+ // Line was empty, skip 'er
+ if( clean_line.length() == 0 ) { return 0; }
+
// One character at a time
for( int i = 0; i < clean_line.length(); i++ ) {
if( clean_line[i] == '=' ) {

Generated by cgit