Skip to content

Commit

Permalink
Fix string splitting code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Reale committed Nov 10, 2016
1 parent 1de162a commit e4d876c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/marshal/pairs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function bashlets_marshal_pairs_get_by_key()
[[ -n $mykey ]] || return
while read line
do
local pair=($(IFS=: echo "$line"))
IFS=: read -r -a pair <<< "$line"
if [[ ${pair[0]} == $mykey ]]
then
echo "${pair[1]}"
Expand All @@ -57,7 +57,7 @@ function bashlets_marshal_pairs_set_by_key()
local -i set=0
while read line
do
local pair=($(IFS=: echo "$line"))
IFS=: read -r -a pair <<< "$line"
if [[ ${pair[0]} == $mykey ]]
then
if [[ $set -eq 0 ]]
Expand Down

0 comments on commit e4d876c

Please sign in to comment.