aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ambdec.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-10 19:38:52 -0800
committerChris Robinson <[email protected]>2018-11-10 19:38:52 -0800
commit2f42f74418f079e2ef8f081a7faf915c5eb131b4 (patch)
tree3d859df111e6d6db857e29398c0407ec6c073dc7 /Alc/ambdec.cpp
parent3939878cc0ac9e9043ee1cb30113136c2a8958e1 (diff)
Ensure ambdec parsing stops at unexpected EOF
Diffstat (limited to 'Alc/ambdec.cpp')
-rw-r--r--Alc/ambdec.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Alc/ambdec.cpp b/Alc/ambdec.cpp
index 088d4a85..b3978551 100644
--- a/Alc/ambdec.cpp
+++ b/Alc/ambdec.cpp
@@ -21,8 +21,7 @@ int readline(std::istream &f, std::string &output)
while(f.good() && f.peek() == '\n')
f.ignore();
- std::getline(f, output);
- return !output.empty();
+ return std::getline(f, output) && !output.empty();
}
bool read_clipped_line(std::istream &f, std::string &buffer)