mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +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)
|
||||
{
|
||||
int tmp = WMGetPopUpButtonSelectedItem(panel->posP);
|
||||
|
||||
if (tmp < 0)
|
||||
return;
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
||||
|
||||
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)],
|
||||
"WorkspaceNameDisplayPosition");
|
||||
SetStringForKey(WSNamePositions[tmp], "WorkspaceNameDisplayPosition");
|
||||
}
|
||||
|
||||
Panel *InitWorkspace(WMWidget *parent)
|
||||
|
||||
Reference in New Issue
Block a user