Fixing firmata out of bounds error

This commit is contained in:
Javier Cervantes 2014-07-10 14:58:29 -05:00
parent 1700c1276c
commit 8d76823af7
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ func (b *board) process(data []byte) {
case AnalogMappingResponse: case AnalogMappingResponse:
pinIndex := byte(0) pinIndex := byte(0)
for _, val := range currentBuffer[2 : len(currentBuffer)-1] { for _, val := range currentBuffer[2 : len(b.Pins)-1] {
b.Pins[pinIndex].AnalogChannel = val b.Pins[pinIndex].AnalogChannel = val