From e6aa13258b39d7b7eeb080ca371d75b5ecb1dae7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 12:54:41 +0300 Subject: [PATCH] Fixed: trimQuotes --HG-- branch : develop --- code/nel/include/nel/misc/common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 350abc7f3..6d261ff8d 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -282,9 +282,11 @@ template T trimQuotes (const T &str) typename T::size_type size = str.size(); if (size == 0) return str; - if (str[0] != str[size-1] && (str[0] != '"' || str[0] != '\'')) + if (str[0] != str[size-1]) return str; - return str.substr(1, size - 1); + if (str[0] != '"' && str[0] != '\'') + return str; + return str.substr(1, size - 2); } //////////////////////////////////////////////////////////////////////////