summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-29 14:13:57 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:57 +0200
commitc8211ceb3e3a9e28767e57a497f8912d6a6bdf5c (patch)
tree46a87bb762b71db8927a3dd20bcf8399b4019090 /src/settings.h
parentc910ead4db55bca09764cda71cd24ee5aef9e93b (diff)
downloadminetest-c8211ceb3e3a9e28767e57a497f8912d6a6bdf5c.tar.gz
minetest-c8211ceb3e3a9e28767e57a497f8912d6a6bdf5c.tar.bz2
minetest-c8211ceb3e3a9e28767e57a497f8912d6a6bdf5c.zip
Some MSVC fixes
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/settings.h b/src/settings.h
index af010fe06..4bc22eaa1 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -78,8 +78,8 @@ public:
std::string trimmedline = trim(line);
- // Ignore comments
- if(trimmedline[0] == '#')
+ // Ignore empty lines and comments
+ if(trimmedline.size() == 0 || trimmedline[0] == '#')
return true;
//infostream<<"trimmedline=\""<<trimmedline<<"\""<<std::endl;
@@ -189,8 +189,8 @@ public:
if(is.eof() == false)
line_end = "\n";
- // Ignore comments
- if(trimmedline[0] == '#')
+ // Ignore empty lines and comments
+ if(trimmedline.size() == 0 || trimmedline[0] == '#')
{
dst.push_back(line+line_end);
return true;