From e15d50aa85d2781cebd3cd3f181e088c06d9d706 Mon Sep 17 00:00:00 2001 From: Chen Date: Thu, 23 Jul 2020 21:48:20 +0800 Subject: [PATCH] Fix runtime exceptions in Visual Studio environment. (#926) --- src/singledocparser.cpp | 2 +- test/integration/emitter_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/singledocparser.cpp b/src/singledocparser.cpp index 4bbea766a..405ecade1 100644 --- a/src/singledocparser.cpp +++ b/src/singledocparser.cpp @@ -48,7 +48,7 @@ void SingleDocParser::HandleDocument(EventHandler& eventHandler) { } void SingleDocParser::HandleNode(EventHandler& eventHandler) { - DepthGuard<2000> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE); + DepthGuard<500> depthguard(depth, m_scanner.mark(), ErrorMsg::BAD_FILE); // an empty node *is* a possibility if (m_scanner.empty()) { diff --git a/test/integration/emitter_test.cpp b/test/integration/emitter_test.cpp index e84f57bca..86eeb60db 100644 --- a/test/integration/emitter_test.cpp +++ b/test/integration/emitter_test.cpp @@ -804,7 +804,7 @@ TEST_F(EmitterTest, OutputCharset) { out << "\x24 \xC2\xA2 \xE2\x82\xAC"; out << EndSeq; - ExpectEmit("- $ ¢ €\n- \"$ \\xa2 \\u20ac\""); + ExpectEmit("- \x24 \xC2\xA2 \xE2\x82\xAC\n- \"\x24 \\xa2 \\u20ac\""); } TEST_F(EmitterTest, EscapedUnicode) {