mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 16:31:29 +00:00
Remove optimization off of quest::ChooseRandom on msvc to solve a crash on x64 in release mode
This commit is contained in:
parent
6a416a78a8
commit
8a0d4e37bd
@ -1612,6 +1612,13 @@ XS(XS__respawn) {
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//64 bit windows seems to optimize something poorly here causing access violations.
|
||||||
|
//If you don't do anything with index before passing it to perl it gets optimized out
|
||||||
|
//Disabling optimization right now for msvc on this function is the best solution.
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma optimize( "", off )
|
||||||
|
#endif
|
||||||
|
|
||||||
XS(XS__ChooseRandom);
|
XS(XS__ChooseRandom);
|
||||||
XS(XS__ChooseRandom) {
|
XS(XS__ChooseRandom) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
@ -1628,6 +1635,10 @@ XS(XS__ChooseRandom) {
|
|||||||
XSRETURN(1); //return 1 element from the stack (ST(0))
|
XSRETURN(1); //return 1 element from the stack (ST(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma optimize( "", on )
|
||||||
|
#endif
|
||||||
|
|
||||||
XS(XS__set_proximity);
|
XS(XS__set_proximity);
|
||||||
XS(XS__set_proximity) {
|
XS(XS__set_proximity) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user