mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
long buffer correct
git-svn-id: https://svn.fhem.de/fhem/trunk@1303 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0f0294290f
commit
64ebe63c2c
@ -297,7 +297,7 @@ TRX_Read($)
|
||||
#Log 1, "TRX: TRX_Read '$hexline'";
|
||||
|
||||
# first char as byte represents number of bytes of the message
|
||||
my $num_bytes = ord($TRX_data);
|
||||
my $num_bytes = ord(substr($TRX_data,0,1));
|
||||
|
||||
while(length($TRX_data) > $num_bytes) {
|
||||
# the buffer contains at least the number of bytes we need
|
||||
@ -310,6 +310,7 @@ TRX_Read($)
|
||||
#Log 1, "TRX_Read TRX_data '$hexline'";
|
||||
#
|
||||
TRX_Parse($hash, $hash, $name, unpack('H*', $rmsg));
|
||||
$num_bytes = ord(substr($TRX_data,0,1));
|
||||
}
|
||||
#Log 1, "TRX_Read END";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user