From 84af4ebaf2cd7af727a304463504e136bbbbf1e9 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 19 Sep 2010 18:54:15 +0200 Subject: [PATCH] fix bit-endian 16 bit unpack for move --- premotedroid-server.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1