← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/multilineeditbox-uninitialized_value into lp:widelands

 

Jukka Pakarinen has proposed merging lp:~widelands-dev/widelands/multilineeditbox-uninitialized_value into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/multilineeditbox-uninitialized_value/+merge/334642

During wondering of the bug 1699778, I found (with consulting the Valgrind) multiple comparisons depend on uninitialised value(s). The cases are reported in the bug. The change in the branch fix those comparison problems.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/multilineeditbox-uninitialized_value into lp:widelands.
=== modified file 'src/ui_basic/multilineeditbox.cc'
--- src/ui_basic/multilineeditbox.cc	2017-09-20 21:27:25 +0000
+++ src/ui_basic/multilineeditbox.cc	2017-12-03 17:47:01 +0000
@@ -105,6 +105,7 @@
    : scrollbar(&o, o.get_w() - Scrollbar::kSize, 0, Scrollbar::kSize, o.get_h(), button_background),
      background(init_background),
      cursor_pos(0),
+     lineheight(1),
      maxbytes(std::min(g_gr->max_texture_size() / UI_FONT_SIZE_SMALL, 0xffff)),
      ww_valid(false),
      owner(o) {


Follow ups