Skip to content

Commit

Permalink
Fix in-range? contract to allow "writing" empty u8vectors (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewc authored Oct 23, 2024
1 parent 9d666da commit 0a91788
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gerbil/runtime/util.ss
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,8 @@ namespace: #f

(def (write-u8vector (bytes : :u8vector)
(port :~ output-port? :- :port)
(start :~ (in-range? 0 (u8vector-length bytes)) :- :fixnum
:= 0)
(end :~ (in-range-inclusive? start (u8vector-length bytes)) :- :fixnum
(start :- :fixnum := 0)
(end :~ (in-range-inclusive? start (u8vector-length bytes)) :- :fixnum
:= (u8vector-length bytes)))
=> :void
(:- (##write-subu8vector bytes start end port)
Expand Down

0 comments on commit 0a91788

Please sign in to comment.