mirror of
https://github.com/penpot/penpot.git
synced 2026-05-01 14:18:07 +00:00
🐛 Fix swapped arguments in CLJS PathData -nth with default
The CLJS implementation of PathData's -nth protocol method had swapped arguments in the 3-arity version (with default value). The call (d/in-range? i size) should be (d/in-range? size i) to match the CLJ implementation. With swapped args, valid indices always returned the default value, and invalid indices attempted out-of-bounds buffer reads.
This commit is contained in:
parent
e511576f66
commit
2eaf117b56
@ -474,7 +474,7 @@
|
||||
nil))
|
||||
|
||||
(-nth [_ i default]
|
||||
(if (d/in-range? i size)
|
||||
(if (d/in-range? size i)
|
||||
(read-segment buffer i)
|
||||
default))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user