diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-07-19 13:19:12 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-19 20:59:29 +0000 |
commit | 33b42e4ab56d56ff02cd08a47c5f590875d886bf (patch) | |
tree | d168b57aa48373a3213f918471fcd1c8224d2d5d /testing/xfa_js_embedder_test.cpp | |
parent | d4c401194137f3f7f466f6daaa7fe3ffb4b6cd53 (diff) | |
download | pdfium-33b42e4ab56d56ff02cd08a47c5f590875d886bf.tar.xz |
Rename StringCs c_str() to unterminated_c_str().
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'testing/xfa_js_embedder_test.cpp')
-rw-r--r-- | testing/xfa_js_embedder_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp index e5a30f6b88..d36cc815e6 100644 --- a/testing/xfa_js_embedder_test.cpp +++ b/testing/xfa_js_embedder_test.cpp @@ -59,7 +59,7 @@ bool XFAJSEmbedderTest::Execute(const CFX_ByteStringC& input) { CFXJSE_Value msg(GetIsolate()); value_->GetObjectPropertyByIdx(1, &msg); - fprintf(stderr, "JS: %.*s\n", input.GetLength(), input.c_str()); + fprintf(stderr, "JS: %.*s\n", input.GetLength(), input.unterminated_c_str()); // If the parsing of the input fails, then v8 will not run, so there will be // no value here to print. if (msg.IsString() && !msg.ToWideString().IsEmpty()) |