From 293b8d8391ee8bef889be130d0a543a8d3c824bb Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 10 Jun 2019 18:16:10 +0000 Subject: [PATCH] Core: Buffer fix git-svn-id: svn://ultimatepp.org/upp/trunk@13381 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Vcont.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Vcont.h b/uppsrc/Core/Vcont.h index de0c20a6e..909a48727 100644 --- a/uppsrc/Core/Vcont.h +++ b/uppsrc/Core/Vcont.h @@ -93,7 +93,7 @@ public: Buffer(Buffer&& v) { ptr = v.ptr; v.ptr = NULL; } Buffer(size_t size, std::initializer_list init) { - T *t = Malloc(size); for(const auto& i : init) new (t++) T(i); + Malloc(size); T *t = ptr; for(const auto& i : init) new (t++) T(i); } Buffer(std::initializer_list init) : Buffer(init.size(), init) {} };