Skip to content

Commit c76fa32

Browse files
committed
Fix missing case break in NumPy to C array handler.
This would corrupt int8 NumPy arrays when written to from C.
1 parent 2acf224 commit c76fa32

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ v2.0.0
88

99
Unreleased
1010
------------------
11+
Fixed
12+
- `tcod.path.dijkstra2d`, fixed corrupted output with int8 arrays.
1113

1214
11.15.1 - 2020-07-26
1315
--------------------

tcod/path.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ static void set_array_int64(
9292
switch (arr->type) {
9393
case np_int8:
9494
*(int8_t*)ptr = (int8_t)value;
95+
return;
9596
case np_int16:
9697
*(int16_t*)ptr = (int16_t)value;
9798
return;

0 commit comments

Comments
 (0)