Fabian Maurer : wrc: Don' t crash when parsing COMBOBOX element without style.

Alexandre Julliard julliard at winehq.org
Thu Sep 13 03:49:17 CDT 2018


Module: wine
Branch: stable
Commit: 56cc1b8af24488d9a7a972f0b6d234a9ec23cd8f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=56cc1b8af24488d9a7a972f0b6d234a9ec23cd8f

Author: Fabian Maurer <dark.shadow4 at web.de>
Date:   Fri Jul 20 17:33:12 2018 +0200

wrc: Don't crash when parsing COMBOBOX element without style.

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit c0dfdbcf7b07d5f456a4669cf215f77135484e47)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 tools/wrc/parser.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index 0f73f90..8196e9f 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -1969,7 +1969,7 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
 		defaultstyle |= LBS_NOTIFY | WS_BORDER;
 		break;
 	case CT_COMBOBOX:
-                if (!(ctrl->style->or_mask & (CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST)))
+                if (!ctrl->gotstyle || !(ctrl->style->or_mask & (CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST)))
                     defaultstyle |= CBS_SIMPLE;
 		break;
 	case CT_STATIC:




More information about the wine-cvs mailing list