Merge lp:~widelands-dev/widelands/bug-1530723 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 7729
Proposed branch: lp:~widelands-dev/widelands/bug-1530723
Merge into: lp:widelands
Diff against target: 12 lines (+1/-1)
1 file modified
src/graphic/wordwrap.cc (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1530723
Reviewer Review Type Date Requested Status
TiborB Approve
kaputtnik (community) functionality Approve
Review via email: mp+283713@code.launchpad.net

Commit message

WordWrap no longer checks the safety margin for empty text. This fixes a crash in the Game Results screen.

Description of the change

The game results screen for Collectors should no longer crash with an assert error.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~widelands-dev/widelands/bug-1530723 mirrored to https://github.com/widelands/widelands/tree/_widelands_dev_widelands_bug_1530723

You can give me commands by starting a line with @bunnybot <command>. I understand:
 merge: Merges the source branch into the target branch, closing the merge proposal. I will use the proposed commit message if it is set.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Travis build 348 has changed state to: passed. Details: https://travis-ci.org/widelands/widelands/builds/104266073.

Revision history for this message
kaputtnik (franku) wrote :

No crash anymore when winning a game :-)

review: Approve (functionality)
Revision history for this message
TiborB (tiborb95) wrote :

Code looks good :)

my first bunnybot merge:)

@bunnybot merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/graphic/wordwrap.cc'
2--- src/graphic/wordwrap.cc 2015-12-13 18:35:45 +0000
3+++ src/graphic/wordwrap.cc 2016-01-23 10:28:07 +0000
4@@ -148,7 +148,7 @@
5 uint32_t safety_margin)
6 {
7 std::string::size_type minimum_chars = 1; // So we won't get empty lines
8- assert(m_wrapwidth > safety_margin);
9+ assert(text.empty() || m_wrapwidth > safety_margin);
10
11 std::string::size_type orig_end = text.find('\n', line_start);
12 if (orig_end == std::string::npos)

Subscribers

People subscribed via source and target branches

to status/vote changes: