switch to wrapping subtract since it is safe here

This commit is contained in:
Brendan Hansknecht 2022-08-01 22:32:16 -07:00
parent afaf59a050
commit ca8b052094
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -197,7 +197,7 @@ inline fn decref_ptr_to_refcount(
if (refcount != REFCOUNT_MAX_ISIZE) {
switch (RC_TYPE) {
Refcount.normal => {
refcount_ptr[0] = refcount - 1;
refcount_ptr[0] = refcount -% 1;
if (refcount == REFCOUNT_ONE_ISIZE) {
dealloc(@ptrCast([*]u8, refcount_ptr) - (extra_bytes - @sizeOf(usize)), alignment);
}