Page MenuHomeWildfire Games

Fix rP21480
ClosedPublic

Authored by Stan on Mar 10 2018, 5:26 PM.

Details

Reviewers
vladislavbelov
Itms
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

In rP21480 a typo was introduced where caster became caster hence breaking indexes. This patch fixes that.
It also fixes a typo where u8 was thought to be 16384

It also fixes a peculiar bug that didn't change the behaviour
Before this patch
x0 static_cast<u16>(g_HalfMaxCoord + g_HalfMaxCoord * svec.Y / svec.W));
-> x0 = 6493
Original and after this patch
x0 static_cast<u16>(g_HalfMaxCoord + static_cast<u16>(g_HalfMaxCoord * svec.Y / svec.W)));
-> x0 = 6494

Test Plan

Test everything is back to normal

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 5467
Build 9242: Vulcan BuildJenkins

Event Timeline

Stan updated this revision to Diff 6119.Mar 10 2018, 5:26 PM
Stan created this revision.

Remove useless cast

Stan updated this revision to Diff 6120.Mar 10 2018, 5:28 PM

remove extra space

Vulcan added a subscriber: Vulcan.Mar 10 2018, 5:30 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/215/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/216/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/217/display/redirect

Silier added a subscriber: Silier.Mar 10 2018, 6:29 PM

I do not get crash with patch.

Itms requested changes to this revision.Mar 10 2018, 6:56 PM
Itms added a subscriber: Itms.

I'm testing, two nitpicks first!

source/renderer/SilhouetteRenderer.cpp
104

On the other hand, this doesn't make much sense, g_HalfMaxCoord = g_MaxCoord / 2; would be better.

174

Since we access containers with this, size_t was better.

This revision now requires changes to proceed.Mar 10 2018, 6:56 PM
Stan updated this revision to Diff 6126.Mar 10 2018, 7:15 PM

Fix above comments.

Itms accepted this revision.Mar 10 2018, 7:39 PM

This works and looks good, thanks for the quick fix. I don't have time to commit it, can you do it or ask Vlad? Thank you!

This revision is now accepted and ready to land.Mar 10 2018, 7:39 PM
Stan closed this revision.Mar 10 2018, 11:46 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/220/display/redirect