mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-30 08:01:02 +00:00
Fix out of bounds access for buggy UIs
Seen with the main menu on the mod 'Classic Doom 3'.
This commit is contained in:
parent
3e07208cae
commit
91bca094c0
1 changed files with 4 additions and 4 deletions
|
@ -387,22 +387,22 @@ void idListWindow::PostParse() {
|
|||
r.x = tabStops[i];
|
||||
r.w = (i < c - 1) ? tabStops[i+1] - r.x - tabBorder : -1;
|
||||
r.align = (doAligns) ? tabAligns[i] : 0;
|
||||
if(tabVAligns.Num() > 0) {
|
||||
if(tabVAligns.Num() > 0 && i < tabVAligns.Num()) {
|
||||
r.valign = tabVAligns[i];
|
||||
} else {
|
||||
r.valign = 0;
|
||||
}
|
||||
if(tabTypes.Num() > 0) {
|
||||
if(tabTypes.Num() > 0 && i < tabTypes.Num()) {
|
||||
r.type = tabTypes[i];
|
||||
} else {
|
||||
r.type = TAB_TYPE_TEXT;
|
||||
}
|
||||
if(tabSizes.Num() > 0) {
|
||||
if(tabSizes.Num() > 0 && i < tabSizes.Num() ) {
|
||||
r.iconSize = tabSizes[i];
|
||||
} else {
|
||||
r.iconSize.Zero();
|
||||
}
|
||||
if(tabIconVOffsets.Num() > 0 ) {
|
||||
if(tabIconVOffsets.Num() > 0 && i < tabIconVOffsets.Num()) {
|
||||
r.iconVOffset = tabIconVOffsets[i];
|
||||
} else {
|
||||
r.iconVOffset = 0;
|
||||
|
|
Loading…
Reference in a new issue