From: Dobrica Pavlinusic Date: Sun, 19 Sep 2010 16:54:15 +0000 (+0200) Subject: fix bit-endian 16 bit unpack for move X-Git-Url: http://git.rot13.org/?p=premotedroid-server-perl.git;a=commitdiff_plain;h=84af4ebaf2cd7af727a304463504e136bbbbf1e9 fix bit-endian 16 bit unpack for move --- diff --git a/premotedroid-server.pl b/premotedroid-server.pl index 25ae497..0d7c6b0 100755 --- a/premotedroid-server.pl +++ b/premotedroid-server.pl @@ -45,7 +45,7 @@ while ( my $client = $sock->accept() ) { warn "# command: $command\n"; if ( $command == MOUSE_MOVE ) { read $client, my $move, 4; - my ( $x, $y ) = unpack 'ss', $move; + my ( $x, $y ) = unpack 's>s>', $move; # big-endian 16 bit warn "MOVE $x $y\n"; } elsif ( $command == MOUSE_CLICK ) { read $client, my $b, 2;