Fix false positive errors in digispark adaptor

This commit is contained in:
Adrian Zankich 2014-11-29 22:21:35 -08:00
parent d17134235c
commit e7694b09cd
1 changed files with 5 additions and 1 deletions

View File

@ -71,5 +71,9 @@ func (l *littleWire) servoUpdateLocation(locationA uint8, locationB uint8) error
}
func (l *littleWire) error() error {
return errors.New(C.GoString(C.littleWire_errorName()))
str := C.GoString(C.littleWire_errorName())
if str != "" {
return errors.New(str)
}
return nil
}