Request::get_base_required_time: WARNING nr = 1 but count is 1, which is not allowed according to the comment for this function
Bug #601400 reported by
Marty Shannon
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
I'm pretty sure I've been seeing this since at least Release 15, but for certain it's in bzr5412. It happens a *lot*.
Related branches
lp:~aber/widelands/deleteSomeFilesNow
- Widelands Developers: Pending requested
-
Diff: 526 lines (+8/-498)3 files modifiedsrc/economy/request.cc (+8/-5)
src/graphic/SDL_mng.cc (+0/-433)
src/graphic/SDL_mng.h (+0/-60)
Changed in widelands: | |
status: | New → Confirmed |
Changed in widelands: | |
milestone: | none → build16-rc1 |
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Quick skim of the code: in request.cc, should the warning be thrown if (m_count < nr) not when (m_count <= nr)? I believe that the number requested can equal to the maximum size. See the original code below:
/** :get_base_ required_ time :get_base_ required_ time: WARNING nr = %u but count is %u, " get_gametime( );
* Return the point in time at which we want the item of the given number to
* be delivered. nr is in the range [0..m_count[
*/
int32_t Request:
(Editor_Game_Base & egbase, uint32_t const nr) const
{
if (m_count <= nr)
log
("Request:
"which is not allowed according to the comment for this function\n",
nr, m_count);
int32_t const curtime = egbase.