[ scummvm-Bugs-620854 ] Launcher crashes game

noreply at sourceforge.net noreply at sourceforge.net
Wed Oct 9 18:06:17 CEST 2002


Bugs item #620854, was opened at 2002-10-09 18:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=620854&group_id=37116

Category: GUI
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard (trinity78)
Assigned to: Nobody/Anonymous (nobody)
Summary: Launcher crashes game

Initial Comment:
Using the latest daily build with Win2k + SDL backend, i 
noticed a crash when starting scummvm.exe without 
any parameters. Instead that the launcher is displayed 
the game crashes with a exception. This is caused by:

ScrollBarWidget.cpp

void ScrollBarWidget::recalc()
{
	_sliderHeight = (_h - 2 * 
UP_DOWN_BOX_HEIGHT) * _entriesPerPage / 
_numEntries;
	if (_sliderHeight < UP_DOWN_BOX_HEIGHT)
		_sliderHeight = 
UP_DOWN_BOX_HEIGHT;
	

	_sliderPos =
		UP_DOWN_BOX_HEIGHT + (_h - 
2 * UP_DOWN_BOX_HEIGHT - _sliderHeight) * 
_currentPos / (_numEntries - _entriesPerPage);

	//  On startup: _sliderPos = 10 + (112 - 2*10 -
 92) * 0 / (10 - 10)
	// _numEntries and  _entriesPerPage have 
both the value of 10, which causes a divison by zero

	if (_sliderPos < 0)
		_sliderPos = 0;
}

as you can see it is a divison by zero which causes the 
crash.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=620854&group_id=37116




More information about the Scummvm-tracker mailing list