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>
diff --git a/fpdfsdk/fsdk_filewriteadapter.cpp b/fpdfsdk/fsdk_filewriteadapter.cpp
index ff527a6..50394c3 100644
--- a/fpdfsdk/fsdk_filewriteadapter.cpp
+++ b/fpdfsdk/fsdk_filewriteadapter.cpp
@@ -18,5 +18,5 @@
}
bool FSDK_FileWriteAdapter::WriteString(const CFX_ByteStringC& str) {
- return WriteBlock(str.c_str(), str.GetLength());
+ return WriteBlock(str.unterminated_c_str(), str.GetLength());
}