Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011813Dwarf FortressDwarf Mode -- Interface, Announcementspublic2021-10-05 06:392021-10-25 01:01
Assigned To 
PlatformOSOS Version
Product Version0.47.05 
Target VersionFixed in Version 
Summary0011813: '&' in nickname messes with announcement text
DescriptionIt looks like the announcement and report code uses '&' as an escape sequence. Putting "&r" in a dwarf's nickname or profession will split the announcement at that point and continue the rest two lines down. In other combinations, the '&' will display, but the next character in the string will be ignored.

'&' in user text needs to be sanitized to "&&" at some point before ending up in an announcement.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
Bumber (reporter)
2021-10-25 00:53

There's also an issue in the related code where use of enough ampersands will cause the line to be cut at the wrong index, deleting text. I set custom professions on my sparring dwarves as "&&aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&" and "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&".

gamelog.txt shows:
"The &&aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa& strikes at the &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& but the shot is blocked!"

Sparring report shows:
"The &aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
&&&&&&&&&&&&&&&&&&&but the shot is blocked!"
Bumber (reporter)
2021-10-25 01:01
edited on: 2021-10-25 22:40

(There's also a hypothetical crash that could occur if the index to cut the line at underflows as a result of the above, but you'd need 71+ consecutive characters without a space on the smallest grid size of 80.)

- Issue History
Date Modified Username Field Change
2021-10-05 06:39 Bumber New Issue
2021-10-25 00:53 Bumber Note Added: 0041165
2021-10-25 01:01 Bumber Note Added: 0041166
2021-10-25 22:40 Bumber Note Edited: 0041166 View Revisions

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker