mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-06 10:40:48 +05:00
Don't use allocsize uninitialized in Array(Array&&)
This fixes an integer overflow error that clang++ -fsanitize caught for me, and might fix allocation failures for users with mem tracing enabled. Refs issue #188
This commit is contained in:
parent
790f4784ed
commit
6da5dd96d5
@ -731,7 +731,7 @@ namespace ngcore
|
||||
mem_to_delete = nullptr;
|
||||
}
|
||||
|
||||
NETGEN_INLINE Array (Array && a2)
|
||||
NETGEN_INLINE Array (Array && a2) : allocsize(0)
|
||||
{
|
||||
mt.Swap(sizeof(T) * allocsize, a2.mt, sizeof(T) * a2.allocsize);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user