# I found an error in TMultiMap -\> MultiFindPointer

**URL:** <https://forums.unrealengine.com/t/i-found-an-error-in-tmultimap-multifindpointer/295909>\
**Category:** C++\
**Tags:** container, unreal-engine, bug-report, CPP, question\
**Created:** [October 12, 2014, 10:30am UTC](https://forums.unrealengine.com/t/i-found-an-error-in-tmultimap-multifindpointer/295909 "2014-10-12T10:30:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dredok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dredok](https://forums.unrealengine.com/u/Dredok)\
**Post date:** [October 12, 2014, 10:30am UTC](https://forums.unrealengine.com/t/i-found-an-error-in-tmultimap-multifindpointer/295909/1 "2014-10-12T10:30:44Z")

</div>

Inside MultiFindPointer (Map.h line 1009) (commit 641c5a10bec343c5ab84150d2ee67e6c81750b80)

```
		new(OrderedValues) const ValueType*(OutValues(Index)); 

```

should be

```
		new(OrderedValues) const ValueType*(OutValues[Index]); 

```

I have also a question about the usage of placement new here … I’m a bit confused because I don’t use that much the placement new but I see there is no any offset in OrderedValues so it should be always overwriting the @OrderedValues. I guess there is some overloading trickery involved here…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [October 14, 2014, 7:55pm UTC](https://forums.unrealengine.com/t/i-found-an-error-in-tmultimap-multifindpointer/295909/2 "2014-10-14T19:55:55Z")

</div>

Hi Dredok,

This error was caught and [corrected](https://github.com/EpicGames/UnrealEngine/commit/b69286fe1ec75f595cd22d987f4866c0f569cdb3) just a few days ago.

For your question about the `new` operator, it is being overloaded. The TArray class overloads the `new` operator to allow memory to be dynamically reallocated for the TArray if it is necessary.
