Skip to content

Commit

Permalink
fix a crucial bug in parser skipping single 0x30 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ntruchsess committed Jun 26, 2014
1 parent c588d1b commit e0dbfd3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ Revision history for Device-Firmata
0.58 2014.06.26 - Yanick Champoux
cosmetic change to POD for CPAN

0.59 2014.06.26 - Norbert Truchsess
Fix a bug in the parser incorrectly skipping single 0x30 bytes
4 changes: 2 additions & 2 deletions lib/Device/Firmata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Device::Firmata - Perl interface to Firmata for the arduino platform.
=head1 VERSION
Version 0.58
Version 0.59
=cut

our $VERSION = '0.58';
our $VERSION = '0.59';
our $DEBUG = 0;


Expand Down
4 changes: 2 additions & 2 deletions lib/Device/Firmata/Platform.pm
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,8 @@ sub poll {

# --------------------------------------------------
my $self = shift;
my $buf = $self->{io}->data_read(2048) or return;
my $messages = $self->{protocol}->message_data_receive($buf);
my $buf = $self->{io}->data_read(2048);
my $messages = $self->{protocol}->message_data_receive($buf) or return;
$self->messages_handle($messages);
return $messages;
}
Expand Down

0 comments on commit e0dbfd3

Please sign in to comment.