[Scummvm-cvs-logs] scummvm master -> f125dce608026b868fa2d705ecd1c15b3e0272ac

criezy criezy at scummvm.org
Sun Aug 11 00:28:04 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f125dce608 GUI: Initialise _hotkey in ButtonWidget constructor


Commit: f125dce608026b868fa2d705ecd1c15b3e0272ac
    https://github.com/scummvm/scummvm/commit/f125dce608026b868fa2d705ecd1c15b3e0272ac
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2013-08-10T15:26:53-07:00

Commit Message:
GUI: Initialise _hotkey in ButtonWidget constructor

One of the two ButtonWidget constructor did not initialise _hotkey
when given a non-null value. This caused valgrind to report an
access to uninitialised variable in Dialog::handleKeyDown().

Changed paths:
    gui/widget.cpp



diff --git a/gui/widget.cpp b/gui/widget.cpp
index d97c46a..e96b62e 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -287,7 +287,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co
 
 ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss),
-	  _cmd(cmd), _lastTime(0) {
+	  _cmd(cmd), _hotkey(hotkey), _lastTime(0) {
 	if (hotkey == 0)
 		_hotkey = parseHotkey(label);
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);






More information about the Scummvm-git-logs mailing list