Buffer overrun bug fixes

This commit is contained in:
Jack Andersen 2017-11-27 16:48:24 -10:00
parent f60097b7e3
commit 31ccb48246
5 changed files with 13 additions and 7 deletions

View File

@ -204,6 +204,12 @@ struct SDSPStream : boo::IAudioVoiceCallback
size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data)
{
if (!x0_active)
{
memset(data, 0, frames * 2);
return frames;
}
if (xe8_silent)
{
StopStream();

View File

@ -594,7 +594,7 @@ zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
zeus::CFrustum frustum;
zeus::CProjection proj;
proj.setPersp(zeus::SProjPersp{fov, width / height, cam->GetNearClipDistance(), cam->GetFarClipDistance()});
frustum.updatePlanes(CGraphics::g_GXModelView, proj);
frustum.updatePlanes(camXf, proj);
g_Renderer->SetClippingPlanes(frustum);
//g_Renderer->PrimColor(zeus::CColor::skWhite);
CGraphics::SetModelMatrix(zeus::CTransform::Identity());

View File

@ -316,7 +316,7 @@ public:
if (base::x0_size == N)
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
#endif
auto target_it = base::_const_cast_iterator(pos) - 1;
auto target_it = base::_const_cast_iterator(pos);
if (pos == base::cend())
{
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(value);
@ -339,7 +339,7 @@ public:
if (base::x0_size == N)
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
#endif
auto target_it = base::_const_cast_iterator(pos) - 1;
auto target_it = base::_const_cast_iterator(pos);
if (pos == base::cend())
{
::new (static_cast<void*>(std::addressof(base::_value(base::x0_size)))) T(std::forward<T>(value));
@ -527,7 +527,7 @@ public:
if (base::x0_size == N)
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
#endif
auto target_it = base::_const_cast_iterator(pos) - 1;
auto target_it = base::_const_cast_iterator(pos);
if (pos == base::cend())
{
*target_it = value;
@ -548,7 +548,7 @@ public:
if (base::x0_size == N)
Log.report(logvisor::Fatal, "insert() called on full rstl::reserved_vector.");
#endif
auto target_it = base::_const_cast_iterator(pos) - 1;
auto target_it = base::_const_cast_iterator(pos);
if (pos == base::cend())
{
*target_it = std::forward<T>(value);

2
amuse

@ -1 +1 @@
Subproject commit ebe6f18898411aa8fa6aa6f5556333e463bbfff9
Subproject commit 3c7cf5515f9aeaf658f6fb6a8474743d027cc13f

@ -1 +1 @@
Subproject commit 726c42873311435b263e6bc41444b393f13abee2
Subproject commit 410ab94d7f5d5d6c5081af90ae9c217b10978db1