From e8686cf5bca87e32af0b47ae55e148af12704b11 Mon Sep 17 00:00:00 2001 From: Svetlana Kulikova Date: Mon, 20 Jul 2020 17:57:54 +0300 Subject: [PATCH] error with numbers footnotes --- Fb2File/Fb2File.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Fb2File/Fb2File.cpp b/Fb2File/Fb2File.cpp index 5decf2da13..1005017eae 100644 --- a/Fb2File/Fb2File.cpp +++ b/Fb2File/Fb2File.cpp @@ -733,10 +733,7 @@ public: m_oLightReader.MoveToElement(); // Читаем сноски if(bNotes) - { - std::wstring sFootnoteId = std::to_wstring(nFootnoteId++); - readNotes(sFootnoteId, oFootnotes); - } + readNotes(nFootnoteId, oFootnotes); // Читаем содержание else readContents(nContentsId, oContents); @@ -804,7 +801,7 @@ public: } // Читает сноски - void readNotes(const std::wstring& sFootnoteId, NSStringUtils::CStringBuilder& oFootnotes) + void readNotes(int& nFootnoteId, NSStringUtils::CStringBuilder& oFootnotes) { int nBDepth = m_oLightReader.GetDepth(); while(m_oLightReader.ReadNextSiblingNode(nBDepth)) @@ -826,6 +823,7 @@ public: if(sFootnoteName == L"") continue; + std::wstring sFootnoteId = std::to_wstring(nFootnoteId++); m_mFootnotes.insert(std::make_pair(sFootnoteName, sFootnoteId)); // Пишем сноску oFootnotes += L"