diff options
Diffstat (limited to 'Alc/vector.h')
-rw-r--r-- | Alc/vector.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/vector.h b/Alc/vector.h index ed0780e3..ed9acfb0 100644 --- a/Alc/vector.h +++ b/Alc/vector.h @@ -37,7 +37,8 @@ typedef const _##N* const_##N; \ if(((_x) ? (_x)->Capacity : 0) < _cap) \ { \ - ptrdiff_t data_offset = (char*)((_x)->Data) - (char*)(_x); \ + ptrdiff_t data_offset = (_x) ? (char*)((_x)->Data) - (char*)(_x) : \ + sizeof(*(_x)); \ size_t old_size = ((_x) ? (_x)->Size : 0); \ void *temp; \ \ |