Browse Source

Use int for overflow protection

windows-imgui
Macoy Madson 3 months ago
parent
commit
55fcd30663
  1. 2
      src/DynamicArray.cake

2
src/DynamicArray.cake

@ -81,7 +81,7 @@
(defmacro each-in-dynarray-reverse (dynarray any iterator-name symbol &rest body any)
(tokenize-push output
(c-for
(var (token-splice iterator-name) size_t
(var (token-splice iterator-name) int
(- (dynarray-length (token-splice dynarray)) 1))
;; We could hoist this out but it should be a quick op anyways
(>= (token-splice iterator-name) 0)

Loading…
Cancel
Save