[haiku-bugs] [Haiku] #11111: Division by zero in TabDecorator CID 1210846

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Thu, 07 Aug 2014 21:31:15 -0000

#11111: Division by zero in TabDecorator CID 1210846
-----------------------+------------------------------
 Reporter:  kallisti5  |        Owner:  nobody
     Type:  bug        |       Status:  new
 Priority:  normal     |    Milestone:  R1/alpha5
Component:  - General  |      Version:  R1/Development
 Keywords:             |   Blocked By:
 Blocking:             |  Has a Patch:  0
 Platform:  All        |
-----------------------+------------------------------
 Per CID 1210846, there is a potential division by zero...

 http://cgit.haiku-
 os.org/haiku/tree/src/servers/app/decorator/TabDecorator.cpp#n431

 In TabDecorator::_DistributeTabSize(float delta)
 {{{
 int32 nTabsWithMaxSize = 0;
 .
 .
 for (int32 i = 0; i < fTabList.CountItems(); i++) {
   (make nTabsWithMaxSize larger)
 }
 .
 .
 minus /= nTabsWithMaxSize;
 }}}

 I don't have the time to study the code and fix it, but it was a big
 enough issue I decided it needed a ticket.

--
Ticket URL: <https://dev.haiku-os.org/ticket/11111>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: