long buffer correct

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1303 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig
2012-02-28 13:56:49 +00:00
parent b716ce2f36
commit 9d007a2e88

View File

@@ -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";