R2Northstar / NorthstarLauncher

Launcher used to modify Titanfall 2 to allow mods to be loaded
MIT License
279 stars 127 forks source link

Fix memalloc problems #728

Closed Jan200101 closed 3 months ago

Jan200101 commented 3 months ago

718 stopped Northstar from working for two reasons:

Microsofts documentation on _recalloc is a bit bad so I followed the chromium implementation https://chromium.googlesource.com/chromium/src/+/84db13d2045c3bc2753c4048ec1816373de0c3cc/base/allocator/allocator_shim_override_ucrt_symbols_win.h#102

If the chromium implementation is right and only the new bits are zeroed then the r5sdk implementation is wrong.

Since we need to get the old size for recalloc I also implemented _msize

Tested this myself on Windows but I would love to get another tester for this

Jan200101 commented 3 months ago

seems to work fine

Klemmbaustein