From 6311e2641fa99d263423f9e7bf0c101684b742fd Mon Sep 17 00:00:00 2001 From: Chugunov Roman Date: Sat, 9 Dec 2023 14:41:50 +0300 Subject: [PATCH 1/3] xrGame/PhraseDialog.cpp: Added a checking bad phrase structure --- src/xrGame/PhraseDialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xrGame/PhraseDialog.cpp b/src/xrGame/PhraseDialog.cpp index 55ad268b0b0..0ef2bc91279 100644 --- a/src/xrGame/PhraseDialog.cpp +++ b/src/xrGame/PhraseDialog.cpp @@ -254,6 +254,9 @@ CPhrase* CPhraseDialog::AddPhrase( { CPhrase* phrase = NULL; CPhraseGraph::CVertex* _vertex = data()->m_PhraseGraph.vertex(phrase_id); + + VERIFY2(!_vertex, make_string("Dublicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText())); + if (!_vertex) { phrase = xr_new(); From e160293d73962bf9c99c8f1fb2993dbfd9c5e1c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20Lucezarnii?= Date: Mon, 30 Dec 2024 20:47:11 +0300 Subject: [PATCH 2/3] Update src/xrGame/PhraseDialog.cpp --- src/xrGame/PhraseDialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xrGame/PhraseDialog.cpp b/src/xrGame/PhraseDialog.cpp index 0ef2bc91279..618978e0793 100644 --- a/src/xrGame/PhraseDialog.cpp +++ b/src/xrGame/PhraseDialog.cpp @@ -254,8 +254,7 @@ CPhrase* CPhraseDialog::AddPhrase( { CPhrase* phrase = NULL; CPhraseGraph::CVertex* _vertex = data()->m_PhraseGraph.vertex(phrase_id); - - VERIFY2(!_vertex, make_string("Dublicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText())); + VERIFY2(!_vertex, make_string("Duplicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText())); if (!_vertex) { From 3db54b57bcce791ee0e93a0dabfa6f9d74ba1978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20Lucezarnii?= Date: Mon, 30 Dec 2024 20:50:19 +0300 Subject: [PATCH 3/3] Update src/xrGame/PhraseDialog.cpp --- src/xrGame/PhraseDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrGame/PhraseDialog.cpp b/src/xrGame/PhraseDialog.cpp index 618978e0793..ba66cb687d8 100644 --- a/src/xrGame/PhraseDialog.cpp +++ b/src/xrGame/PhraseDialog.cpp @@ -254,7 +254,7 @@ CPhrase* CPhraseDialog::AddPhrase( { CPhrase* phrase = NULL; CPhraseGraph::CVertex* _vertex = data()->m_PhraseGraph.vertex(phrase_id); - VERIFY2(!_vertex, make_string("Duplicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText())); + VERIFY2(!_vertex, make_string("Duplicate phrase ID: [%s] for phrase: [%s]. Existed phrase by this ID: [%s]", phrase_id.c_str(), text, _vertex->data()->GetText()).c_str()); if (!_vertex) {