THRIFT-192. erl: Fix handling of booleans


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757870 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/src/thrift_binary_protocol.erl b/lib/erl/src/thrift_binary_protocol.erl
index e53f5ef..c6dde33 100644
--- a/lib/erl/src/thrift_binary_protocol.erl
+++ b/lib/erl/src/thrift_binary_protocol.erl
@@ -231,9 +231,10 @@
 %%
 
 read(This, bool) ->
-    Byte = read(This, byte),
-    {ok, (Byte /= 0)};
-
+    case read(This, byte) of
+        {ok, Byte} -> {ok, Byte /= 0};
+        Else -> Else
+    end;
 
 read(This, byte) ->
     case read(This, 1) of