mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Coverity: fix WPrefs workspace negative array index read
This commit is contained in:
committed by
Carlos R. Mafra
parent
7475bc5d0a
commit
d4ee17f0b5
@@ -207,12 +207,15 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
static void storeData(_Panel * panel)
|
static void storeData(_Panel * panel)
|
||||||
{
|
{
|
||||||
|
int tmp = WMGetPopUpButtonSelectedItem(panel->posP);
|
||||||
|
|
||||||
|
if (tmp < 0)
|
||||||
|
return;
|
||||||
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
||||||
|
|
||||||
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)],
|
SetStringForKey(WSNamePositions[tmp], "WorkspaceNameDisplayPosition");
|
||||||
"WorkspaceNameDisplayPosition");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel *InitWorkspace(WMWidget *parent)
|
Panel *InitWorkspace(WMWidget *parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user