From 7fac48cc871140b395bb002ad5ed0415686cbf34 Mon Sep 17 00:00:00 2001 From: "lrn@chromium.org" Date: Thu, 11 Nov 2010 13:47:15 +0000 Subject: [PATCH] Fix compile error on Windows (no snprintf support). Luckily the snprintf wasn't really needed. TBR:whesse Review URL: http://codereview.chromium.org/4678007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/test-parsing.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc index 44db0ab..d661af6 100755 --- a/test/cctest/test-parsing.cc +++ b/test/cctest/test-parsing.cc @@ -278,16 +278,14 @@ TEST(RegressChromium62639) { i::StackGuard::SetStackLimit( reinterpret_cast(&marker) - 128 * 1024); - char buffer[4096]; - const char* program_template = "var x = '%01024d'; // filler\n" - "escape: function() {}"; + const char* program = "var x = 'something';\n" + "escape: function() {}"; // Fails parsing expecting an identifier after "function". // Before fix, didn't check *ok after Expect(Token::Identifier, ok), // and then used the invalid currently scanned literal. This always // failed in debug mode, and sometimes crashed in release mode. - snprintf(buffer, sizeof(buffer), program_template, 0); - unibrow::Utf8InputBuffer<256> stream(buffer, strlen(buffer)); + unibrow::Utf8InputBuffer<256> stream(program, strlen(program)); i::ScriptDataImpl* data = i::ParserApi::PreParse(i::Handle::null(), &stream, NULL); CHECK(data->HasError()); -- 2.7.4