From 14fb8fb93d0a08beb02835f508004a21eaa41a26 Mon Sep 17 00:00:00 2001
From: Botond Baranyi <botond.baranyi@ericsson.com>
Date: Wed, 17 Jan 2018 17:01:04 +0100
Subject: [PATCH] Fixed handling of XML schema string in tcov2locv (bug 529855)

Change-Id: I5497757db6c8ce557cfadeee4499f35ddbb39bbb
Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
---
 compiler2/tcov2lcov.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler2/tcov2lcov.cc b/compiler2/tcov2lcov.cc
index 53258e742..448e4f273 100644
--- a/compiler2/tcov2lcov.cc
+++ b/compiler2/tcov2lcov.cc
@@ -336,13 +336,14 @@ int main(int argc, char *argv[])
   // Leave it relative.
   if (!input_dir) input_dir = ".";
   if (!output_file)	output_file = "output.info";
+  std::string xsd_file_str;
   if (!xsd_file) {
     const char *ttcn3_dir = getenv("TTCN3_DIR");
     if (!ttcn3_dir) {
       std::cerr << "$TTCN3_DIR environment variable is not set" << std::endl;
       param_error = true;
     } else {
-      std::string xsd_file_str = std::string(ttcn3_dir) + P_SEP + std::string("include") + P_SEP + std::string("tcov.xsd");
+      xsd_file_str = std::string(ttcn3_dir) + P_SEP + std::string("include") + P_SEP + std::string("tcov.xsd");
       xsd_file = xsd_file_str.c_str();
     }
   }
-- 
GitLab