Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity
This commit is contained in:
@@ -589,8 +589,8 @@ struct NewGRFInspectWindow : Window {
|
||||
if (nif->variables == nullptr) return;
|
||||
|
||||
/* Get the line, make sure it's within the boundaries. */
|
||||
int line = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_NGRFI_MAINPANEL, WidgetDimensions::scaled.frametext.top);
|
||||
if (line == INT_MAX) return;
|
||||
int32_t line = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_NGRFI_MAINPANEL, WidgetDimensions::scaled.frametext.top);
|
||||
if (line == INT32_MAX) return;
|
||||
|
||||
/* Find the variable related to the line */
|
||||
for (const NIVariable *niv = nif->variables; niv->name != nullptr; niv++, line--) {
|
||||
|
Reference in New Issue
Block a user