We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a37b284 + 57e0f7e commit efd7163Copy full SHA for efd7163
CHANGES
@@ -1,3 +1,6 @@
1
+1.0.1 (2013-12-09):
2
+* Fix Cstruct.shift function
3
+
4
1.0.0 (2013-12-05):
5
* Remove IPv4/IPv6 types (now moved to `ocaml-ipaddr`).
6
* Improved ocamldoc for the interface.
lib/cstruct.ml
@@ -73,9 +73,9 @@ let sub t off len =
73
raise (Invalid_argument "Cstruct.sub");
74
{ t with off; len }
75
76
-let shift t off =
77
- let off = t.off + off in
78
- let len = t.len - off in
+let shift t amount =
+ let off = t.off + amount in
+ let len = t.len - amount in
79
if not (check_bounds t (off+len)) then
80
raise (Invalid_argument "Cstruct.shift");
81
0 commit comments