Issue with hotkeys strings
Bug #896193 reported by
Chanterier
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
Fix Released
|
Medium
|
DCoder DCoder |
Bug Description
The following issue happens when I have my stringtable00.csf in the game's directory.
http://
Several strings for hotkeys are reported as MISSING (in 'Commands' and 'Description' windows). My stringtable00.csf does not alter any of CMND strings nor does it add new ones into that category.
Restating "missing" strings in stringtable00.csf does not fix the problem. Of course, those strings are available in the original ra2md.csf file.
The following strings are reported as MISSING:
CMND:CombatantS
CMND:Delete
CMND:DeleteDesc
CMND:HealthNavi
CMND:PlanningMode
CMND:PlanningMo
CMND:TypeSelect
CMND:VetNavigation
Changed in ares: | |
status: | New → Confirmed |
Changed in ares: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → DCoder DCoder (dcoder1337) |
To post a comment you must log in.
The fix for this is https:/ /github. com/Ares- Developers/ Ares/commit/ 1c4762d029a3bdf c783a9b56ae5837 3348e92f97 .
Technical details: pointer math works differently in ASM and C/C++.
In ASM, there is nothing special about pointers, subtracting two memory addresses yields the difference in bytes.
In C/C++, only pointers of the same type can be subtracted from each other, and the result is the number of objects of that type that would fit between lhs (inclusive) and rhs (exclusive).
The code was returning a correct asm-ish difference in one case and a C-ish difference in the other case, which was incorrect and resulted in memory corruption.