Issue with hotkeys strings

Bug #896193 reported by Chanterier
6
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://i53.tinypic.com/8xmxkn.png

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:CombatantSelect
CMND:Delete
CMND:DeleteDesc
CMND:HealthNavigation
CMND:PlanningMode
CMND:PlanningModeDesc
CMND:TypeSelect
CMND:VetNavigation

Changed in ares:
status: New → Confirmed
Changed in ares:
status: Confirmed → Fix Committed
assignee: nobody → DCoder DCoder (dcoder1337)
Revision history for this message
DCoder DCoder (dcoder1337) wrote :

The fix for this is https://github.com/Ares-Developers/Ares/commit/1c4762d029a3bdfc783a9b56ae58373348e92f97 .

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.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

TODO in the future: rewrite the whole fuckdamned CSF handling logic to use a hashmap or something less magicky, and incorporate the missing/nostr handling into it as well.

Revision history for this message
OmegaBolt (omegabolt) wrote :

I can confirm this is fixed.

Revision history for this message
Renegade (renegade) wrote :

Thanks, Omega.

Changed in ares:
status: Fix Committed → Fix Released
milestone: none → 0.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.