mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fixed several bugs from the new file i/o setup.
In particular: 1. Windows CR/LF weren't read properly (issue #11) 2. Scanning wasn't reading EOF properly 3. Documents may be empty (this was old, I think) Also fixed some VS2008 warnings on /W4.
This commit is contained in:
@@ -28,7 +28,7 @@ namespace YAML
|
||||
// ********************************
|
||||
// Phase #1: scan until line ending
|
||||
while(!params.end.Matches(INPUT) && !Exp::Break.Matches(INPUT)) {
|
||||
if(INPUT.peek() == EOF)
|
||||
if(!INPUT)
|
||||
break;
|
||||
|
||||
// document indicator?
|
||||
@@ -60,7 +60,7 @@ namespace YAML
|
||||
}
|
||||
|
||||
// eof? if we're looking to eat something, then we throw
|
||||
if(INPUT.peek() == EOF) {
|
||||
if(!INPUT) {
|
||||
if(params.eatEnd)
|
||||
throw ParserException(INPUT.line, INPUT.column, ErrorMsg::EOF_IN_SCALAR);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user