Util: Reset vector size on deinit
Vicki Pfau vi@endrift.com
Wed, 29 Jul 2020 21:36:34 -0700
2 files changed,
2 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -63,6 +63,7 @@ - Qt: Add hex index to palette view
- Qt: Add transformation matrix info to sprite view - Qt: Add per-page scrolling to memory view (fixes mgba.io/i/1795) - Qt: Add setting to display ROM filename in title (closes mgba.io/i/1784) + - Util: Reset vector size on deinit 0.8.2: (2020-06-14) Emulation fixes:
M
include/mgba-util/vector.h
→
include/mgba-util/vector.h
@@ -47,6 +47,7 @@ void NAME ## Deinit(struct NAME* vector) { \
free(vector->vector); \ vector->vector = 0; \ vector->capacity = 0; \ + vector->size = 0; \ } \ TYPE* NAME ## GetPointer(struct NAME* vector, size_t location) { \ return &vector->vector[location]; \