Opened 7 years ago

Closed 7 years ago

#1597 closed bug (fixed (in v4))

Chardumps and artifact spoilers do not display object descriptions.

Reported by: myshkin Owned by: myshkin
Milestone: v4 Keywords: dump wizmode
Cc:

Description

Where descriptions of an object's capabilities should be in chardumps and artifact spoilers, the game instead prints blank lines.

Change History (2)

comment:1 Changed 7 years ago by myshkin

  • Status changed from new to confirmed

I said on IRC:

What was happening is that object descriptions would eventually call the equivalent of vstrnfmt(buf, sizeof(buf), "%.*c%.*ls\n", indent, ' ', line_length, line), where line is wchar_t. vstrnfmt(), once it gets to handling the 's' part of that format, converts the wchar_t *line to a char arg2[], and then calls sprintf(tmp, "%.Nls", arg2), where the N in the format gets replaced by the value of line_length. Unfortunately, since arg2 is now a char[], this fails. I hacked vstrnfmt() to remove the l from the format string, and now get working chardumps and artifact spoilers. I don't understand how this code path hasn't gotten exercised elsewhere in the game, though, and am worried about other consequences.

comment:2 Changed 7 years ago by myshkin

  • Resolution set to fixed (in v4)
  • Status changed from confirmed to closed

Fixed in commit e38caa4. Also cherry-picked to master in commit 87729fc.

Note: See TracTickets for help on using tickets.