From 1a022e92008eac2a721146edf2e64a306d539014 Mon Sep 17 00:00:00 2001 From: Sergey Batanov Date: Wed, 16 Mar 2022 12:36:23 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20#78=20=D0=A7=D1=82=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B4=D0=BE=20=D0=BD?= =?UTF-8?q?=D1=83=D0=BB=D0=B5=D0=B2=D0=BE=D0=B3=D0=BE=20=D1=81=D0=B8=D0=BC?= =?UTF-8?q?=D0=B2=D0=BE=D0=BB=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/V8File.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/V8File.cpp b/src/V8File.cpp index 6230e1c..80a95e4 100644 --- a/src/V8File.cpp +++ b/src/V8File.cpp @@ -64,9 +64,10 @@ string CV8Elem::GetName() const auto currentChar = header.data() + CV8Elem::stElemHeaderBegin::Size(); for (int j = 0; j < ElemNameLen * 2; j += 2, currentChar += 2) { - if (*currentChar != '\0') { - ss << *currentChar; + if (*currentChar == '\0') { + break; } + ss << *currentChar; } return ss.str();