Skip to content

Commit 47cce29

Browse files
author
Alice Pintus
committed
Merge pull request #8 from arduino/fix_newline
Remove application of newline character by trusting input from client
2 parents a442d90 + 090a04f commit 47cce29

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bufferflow_tinyg.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,8 @@ func (b *BufferflowTinyg) BreakApartCommands(cmd string) []string {
605605
// just put cmd back in with newline
606606
if reSingle.MatchString(item) {
607607
//log.Printf("len1. Added cmd back. Not re-adding newline cuz artificially added one earlier. item:'%v'\n", item)
608-
finalCmds = append(finalCmds, item)
609-
} else {
610-
item = item + "\n"
611-
//log.Printf("len1. Re-adding item to finalCmds with newline:'%v'\n", item)
612-
finalCmds = append(finalCmds, item)
613608
}
609+
finalCmds = append(finalCmds, item)
614610
} else {
615611
for index, item := range cmds {
616612
// since more than 1 cmd, loop thru

0 commit comments

Comments
 (0)