Skip to content

Commit

Permalink
bug-when-receiving-nil fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2bt committed Jul 22, 2011
1 parent ae93be3 commit a83bb9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/wall.lua
Expand Up @@ -85,7 +85,8 @@ function Wall:update_input()
local t = socket.select({ self.socket }, nil, 0)[1]
if t then

local bits = self.socket:receive():match "0901(..).."
local rec = self.socket:receive()
local bits = rec and rec:match "0901(..).."
if bits then
local bits = ("0x" .. bits) * 1 -- convert from hex

Expand Down

0 comments on commit a83bb9a

Please sign in to comment.