mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-25 16:04:28 -04:00
Fix Letter Menu Page Numbers (#722)
This bug comes from `getBounds()` returning a reference to a static variable -- the compiler can load the float right away or later (after the second call), so the value it is referencing may have changed. If it waits to load the first operand, the subtraction results in 0. Further discussion at https://discord.com/channels/1446645861529550869/1446648842387722411/1502415404386091118. Resolves #719
This commit is contained in:
@@ -965,7 +965,8 @@ void dMenu_Letter_c::screenSetBase() {
|
||||
}
|
||||
if (field_0x374 > 1) {
|
||||
J2DPane* pJVar6 = mpBaseScreen->search('pi_n');
|
||||
f32 dVar18 = field_0x1f0[1]->getBounds().i.x - field_0x1f0[0]->getBounds().i.x;
|
||||
f32 x1 = field_0x1f0[1]->getBounds().i.x;
|
||||
f32 dVar18 = x1 - field_0x1f0[0]->getBounds().i.x;
|
||||
f32 dVar17 = dVar18 * (field_0x374 - 1);
|
||||
f32 dVar16 = (pJVar6->getWidth() / 2) - (dVar17 / 2);
|
||||
for (int i = 0; i < 9; i++) {
|
||||
|
||||
Reference in New Issue
Block a user