long buffer correct

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1304 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig 2012-02-28 14:05:28 +00:00
parent fa2cfee189
commit 96834c7f16

View File

@ -290,7 +290,7 @@ RFXCOM_Read($)
#Log 1, "RFXCOM: RFXCOM_Read '$hexline'"; #Log 1, "RFXCOM: RFXCOM_Read '$hexline'";
# first char as byte represents number of bits of the message # first char as byte represents number of bits of the message
my $bits = ord($rfxcom_data); my $bits = ord(substr($rfxcom_data,0,1));
my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; } my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
while(length($rfxcom_data) > $num_bytes) { while(length($rfxcom_data) > $num_bytes) {
@ -304,6 +304,8 @@ RFXCOM_Read($)
#Log 1, "RFXCOM_Read rfxcom_data '$hexline'"; #Log 1, "RFXCOM_Read rfxcom_data '$hexline'";
# #
RFXCOM_Parse($hash, $hash, $name, $rmsg); RFXCOM_Parse($hash, $hash, $name, $rmsg);
$bits = ord(substr($rfxcom_data,0,1));
$num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
} }
#Log 1, "RFXCOM_Read END"; #Log 1, "RFXCOM_Read END";