From 0159043d36ff09c31b8477fd5d944b41e46104e8 Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Tue, 19 Dec 2017 15:44:18 +0100 Subject: [PATCH] Fix was applied in wrong function --- sources/lib/core/include_data.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/lib/core/include_data.sh b/sources/lib/core/include_data.sh index 4fb0d82..7396f8d 100644 --- a/sources/lib/core/include_data.sh +++ b/sources/lib/core/include_data.sh @@ -200,15 +200,15 @@ return 0 # ----------------------------------------------------------------------------- # @(#) FUNCTION: data_newline2hash() # DOES: replace newlines with a hash -# EXPECTS: [string] with newlines -# OUTPUTS: [string] with hashes +# EXPECTS: [string] with newlines (UNIX) +# OUTPUTS: [string] with hashes (UNIX) # RETURNS: 0 # REQUIRES: n/a function data_newline2hash { (( ARG_DEBUG != 0 && ARG_DEBUG_LEVEL > 0 )) && set "${DEBUG_OPTS}" -print "${1}" | tr '\n' '#' 2>/dev/null | tr '\r' '#' 2>/dev/null +print "${1}" | tr '\r' '#' 2>/dev/null return 0 } @@ -248,15 +248,15 @@ return 0 # ----------------------------------------------------------------------------- # @(#) FUNCTION: data_strip_newline() # DOES: remove newlines -# EXPECTS: [string] with newlines (UNIX) -# OUTPUTS: [string] without newlines (UNIX) +# EXPECTS: [string] with newlines +# OUTPUTS: [string] without newlines # RETURNS: 0 # REQUIRES: n/a function data_strip_newline { (( ARG_DEBUG != 0 && ARG_DEBUG_LEVEL > 0 )) && set "${DEBUG_OPTS}" -print "${1}" | tr -d '\r' 2>/dev/null +print "${1}" | tr -d '\n' 2>/dev/null | tr -d '\r' 2>/dev/null return 0 }