Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inventory overwrite #6362

Merged
merged 2 commits into from
Mar 1, 2014

Conversation

kevingranade
Copy link
Member

So I was wrong about curses having a truncation-friendly print method, so I just truncated the string manually. Unfortunately this will not work with multibyte characters, need a dumb truncation method, the ones we have now are too smart and fold instead of truncating. If they are multibyte it'll truncate a little early, which isn't the end of the world.
The underlying problem is the menu isn't split into separate windows, if it were I think It'd truncate automatically.
Candidate for 0.A
Easy reproduction is spawn contained non-drowsy cough syrup and look at your inventory as mentioned in #6358

@Rivet-the-Zombie
Copy link
Member

Hooray for last minute fixes!

@KA101
Copy link
Contributor

KA101 commented Mar 1, 2014

Since I don't see Rivet assigned... ;-)

@KA101 KA101 self-assigned this Mar 1, 2014
mvwputch(w_inv, cur_line, 0, (cur_it == selected ? selected_line_color : c_white), invlet);
mvwprintz(w_inv, cur_line, 1, (cur_it == selected ? selected_line_color : it.color_in_inventory()),
_(" %s"), it.display_name().c_str());
const int item_max_width = 42;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable warning, courtesy of Code::Blocks. (Compiled, but You've Been Warned. O_O )

@KA101
Copy link
Contributor

KA101 commented Mar 1, 2014

Gonna go ahead and merge this, easy enough to scrap that line if Jenkins doesn't like it.

@KA101 KA101 merged commit 2f55d63 into CleverRaven:master Mar 1, 2014
@kevingranade kevingranade deleted the fix-inventory-overwrite branch April 26, 2014 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants