Skip to content

Commit

Permalink
Merge pull request #209 from krkeegan/mstovenour-fix_issue_151
Browse files Browse the repository at this point in the history
Fix for issue #151 - Warnings in message decoder test  -- MANUAL MERGE
  • Loading branch information
krkeegan committed Jun 1, 2013
2 parents e20d474 + f851d58 commit 4f66c1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Insteon/MessageDecoder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ sub plm_decode {
#include the STX for historical reasons
$plm_cmd_id = substr($plm_string,0,4);
$plm_message .= sprintf("%20s: (","PLM Command").$plm_cmd_id.") ".$plmcmd2string{$plm_cmd_id}."\n";
if(length($plm_string) < $plmcmdlen{$plm_cmd_id}->[0] * 2) {
if(length($plm_string) < $plmcmdlen{uc($plm_cmd_id)}->[0] * 2) {
$plm_message .= " Message length too short for PLM command. Not parsed\n";
$abort++;
} elsif(length($plm_string) > $plmcmdlen{$plm_cmd_id}->[0] * 2
and length($plm_string) < $plmcmdlen{$plm_cmd_id}->[1] * 2) {
} elsif(length($plm_string) > $plmcmdlen{uc($plm_cmd_id)}->[0] * 2
and length($plm_string) < $plmcmdlen{uc($plm_cmd_id)}->[1] * 2) {
$plm_message .= " Message length too short for PLM command. Not parsed\n";
$abort++;
} elsif(substr($plm_string,2,1) == '5') {
Expand Down

0 comments on commit 4f66c1f

Please sign in to comment.