From c70db62d3671e524d23ac974d296eb218159b000 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Thu, 25 Feb 2016 06:23:55 +0300 Subject: Initial cmake conversion --- katomic/molek.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'katomic/molek.cpp') diff --git a/katomic/molek.cpp b/katomic/molek.cpp index 46132502..711ece5f 100644 --- a/katomic/molek.cpp +++ b/katomic/molek.cpp @@ -67,7 +67,12 @@ void Molek::load (const KSimpleConfig& config) if (value.isNull()) value = ""; +#ifdef HAVE_STRLCPY strlcpy(current.conn, value.ascii(), sizeof(current.conn)); +#else + strncpy(current.conn, value.ascii(), sizeof(current.conn)); + current.conn[sizeof(current.conn)-1] = 0; +#endif kdWarning( atoms.find(current) != atoms.end() ) << "OOOPS, duplicate atom definition in " << key << endl; atoms.append(current); -- cgit v1.2.1