Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
fca7b7e1
Commit
fca7b7e1
authored
May 14, 2012
by
Jesse Beder
Browse files
Fixed reading bad memory error
parent
4ca9269e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/singledocparser.cpp
src/singledocparser.cpp
+3
-2
No files found.
src/singledocparser.cpp
View file @
fca7b7e1
...
...
@@ -253,6 +253,7 @@ namespace YAML
throw
ParserException
(
Mark
::
null
(),
ErrorMsg
::
END_OF_MAP_FLOW
);
Token
&
token
=
m_scanner
.
peek
();
const
Mark
mark
=
token
.
mark
;
// first check for end
if
(
token
.
type
==
Token
::
FLOW_MAP_END
)
{
m_scanner
.
pop
();
...
...
@@ -264,7 +265,7 @@ namespace YAML
m_scanner
.
pop
();
HandleNode
(
eventHandler
);
}
else
{
eventHandler
.
OnNull
(
token
.
mark
,
NullAnchor
);
eventHandler
.
OnNull
(
mark
,
NullAnchor
);
}
// now grab value (optional)
...
...
@@ -272,7 +273,7 @@ namespace YAML
m_scanner
.
pop
();
HandleNode
(
eventHandler
);
}
else
{
eventHandler
.
OnNull
(
token
.
mark
,
NullAnchor
);
eventHandler
.
OnNull
(
mark
,
NullAnchor
);
}
// now eat the separator (or could be a map end, which we ignore - but if it's neither, then it's a bad node)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment