From 8f67869b1610ca0533e51bfe4789df11a5c4c959 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 1 Aug 2017 10:26:42 -0700 Subject: [PATCH] Use string::copy rather than memcpy --- src/scanner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scanner.cc b/src/scanner.cc index bb30042..6dc5579 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -28,7 +28,7 @@ struct Scanner { } unsigned serialize(char *buffer) { - memcpy(buffer, heredoc_delimiter.c_str(), heredoc_delimiter.length()); + heredoc_delimiter.copy(buffer, heredoc_delimiter.length()); return heredoc_delimiter.length(); }