From 46a6a58fbdcd5ccc726dc372b98cff42fca04f58 Mon Sep 17 00:00:00 2001 From: alx Date: Fri, 21 Feb 2014 15:29:15 +0100 Subject: [PATCH] wwl: fixed dtinfo segfault due to missing copy constructor in WArgList --- cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h | 2 ++ cde/programs/dtinfo/dtinfo/wwl/src/WArgList.C | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h index 61beed94..93f7f3e5 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h +++ b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h @@ -96,6 +96,8 @@ public : } } + WArgList(const WArgList &r); + inline ArgList Args() const { return args; } inline Cardinal NumArgs() const { return num_args; } inline void Reset() { num_args = 0; } diff --git a/cde/programs/dtinfo/dtinfo/wwl/src/WArgList.C b/cde/programs/dtinfo/dtinfo/wwl/src/WArgList.C index 07d6583e..363e7d82 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/src/WArgList.C +++ b/cde/programs/dtinfo/dtinfo/wwl/src/WArgList.C @@ -162,6 +162,14 @@ WArgList::WArgList (String name, XtArgVal value, ...) va_end (argv); } +WArgList::WArgList(const WArgList &r) +{ + num_args = r.num_args; + alloc_args = num_args; + args = new Arg[num_args]; + memcpy(args, r.args, sizeof(Arg)*num_args); +} + /*?nodoc?*/ Arg& WArgList::Grow (Cardinal n) -- 2.25.1