Skip to content

Commit

Permalink
convert intermediate file EOLs to pure \n format
Browse files Browse the repository at this point in the history
otherwise all processing on ino file will likely fail
solves #114
  • Loading branch information
facchinm committed Feb 9, 2016
1 parent 4d20d6d commit 7ff1de1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/arduino.cc/builder/prototypes_adder.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ type PrototypesAdder struct{}
func (s *PrototypesAdder) Run(context map[string]interface{}) error {
debugOutput := context[constants.CTX_DEBUG_PREPROCESSOR] != nil
source := context[constants.CTX_SOURCE].(string)

source = strings.Replace(source, "\r\n", "\n", -1)
source = strings.Replace(source, "\r", "\n", -1)

sourceRows := strings.Split(source, "\n")

if !utils.MapHas(context, constants.CTX_LINE_WHERE_TO_INSERT_PROTOTYPES) {
Expand Down

0 comments on commit 7ff1de1

Please sign in to comment.