From c87e81e8de470f74ae5f2137764e8c38fc3b4989 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 16 Jun 2014 00:53:25 +0100 Subject: [PATCH] Use zstr instead of c_str in ncurses addutf8str --- src/ncurses.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncurses.cc b/src/ncurses.cc index 78e96746..539e8fca 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -211,7 +211,7 @@ using Utf8Policy = utf8::InvalidBytePolicy::Pass; using Utf8Iterator = utf8::utf8_iterator; void addutf8str(WINDOW* win, Utf8Iterator begin, Utf8Iterator end) { - waddstr(win, std::string(begin.base(), end.base()).c_str()); + waddstr(win, StringView(begin.base(), end.base()).zstr()); } static CharCoord window_size(WINDOW* win)