Permalink
Browse files

Fixed 'z_bin_to_pos_int' -- 0 is not a *positive* int

  • Loading branch information...
1 parent af1b1ab commit d01bb976b50b905a115577f0a6efeb5f34255872 @superbobry superbobry committed Mar 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/z_validate.erl
View
@@ -110,7 +110,7 @@ z_bin_to_pos_int(?Z_VALUE(_Val, Err)=ZVal) ->
-spec z_bin_to_pos_int(z_value(binary()), error_term()) -> z_value(pos_integer()).
z_bin_to_pos_int(ZVal, NewErr) ->
- z_verify(fun (X) -> X >= 0 end, z_bin_to_int(ZVal, NewErr)).
+ z_verify(fun (X) -> X > 0 end, z_bin_to_int(ZVal, NewErr)).
-spec z_bin_to_list(z_value(binary())) -> z_value(list()).
z_bin_to_list(?Z_VALUE(_Val, Err)=ZVal) ->

0 comments on commit d01bb97

Please sign in to comment.