mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Merged DMD commit 65e5c33d572077b43385744bb559fc760b4f91d1:
fix 2 issues spotted by valgrind
This commit is contained in:
@@ -161,7 +161,7 @@ void _aaRehash(AA** paa)
|
||||
}
|
||||
}
|
||||
if (aa->b != aa->binit)
|
||||
delete aa->b;
|
||||
delete[] aa->b;
|
||||
|
||||
newb.nodes = aa->nodes;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,8 @@ void Array::append(Array *a)
|
||||
|
||||
void Array::remove(unsigned i)
|
||||
{
|
||||
memmove(data + i, data + i + 1, (dim - i - 1) * sizeof(data[0]));
|
||||
if (dim - i - 1)
|
||||
memmove(data + i, data + i + 1, (dim - i - 1) * sizeof(data[0]));
|
||||
dim--;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user