diff options
author | weili <weili@chromium.org> | 2016-05-20 17:58:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-20 17:58:06 -0700 |
commit | 4cafdefd77e29c9d38ad99c266a60ce296137a35 (patch) | |
tree | faf36bdb2e913944d02ecd1fb1933ade7a0adcd7 /xfa/fwl/lightwidget/cfwl_listbox.cpp | |
parent | 8f5f897b50918fe83da894d9e7a34bbe314244de (diff) | |
download | pdfium-4cafdefd77e29c9d38ad99c266a60ce296137a35.tar.xz |
Return no style in GetItemStyles() for item of null pointer
The error handling in GetItemStyles() of list box is wrong. -1 is
0xFFFFFFFF in uint32_t, which suggests all the style bits on. This was
discovered by a signed/unsigned mismatch warning.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/2005583002
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_listbox.cpp')
-rw-r--r-- | xfa/fwl/lightwidget/cfwl_listbox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_listbox.cpp b/xfa/fwl/lightwidget/cfwl_listbox.cpp index 46433a3198..e8e26f5b52 100644 --- a/xfa/fwl/lightwidget/cfwl_listbox.cpp +++ b/xfa/fwl/lightwidget/cfwl_listbox.cpp @@ -249,7 +249,7 @@ FX_BOOL CFWL_ListBox::CFWL_ListBoxDP::SetItemIndex(IFWL_Widget* pWidget, uint32_t CFWL_ListBox::CFWL_ListBoxDP::GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) { if (!hItem) - return -1; + return 0; return reinterpret_cast<CFWL_ListItem*>(hItem)->m_dwStates; } |