Project

General

Profile

Actions

Bug #2510

closed

Division by zero in Wt::asString() on boost::posix_time::time_duration

Added by Tristan Lanfrey about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
12/09/2013
Due date:
% Done:

0%

Estimated time:

Description

asString() tries to use a WTime object as an intermediary, which is fine, but the conversion from num_fractional_digits to milliseconds is broken.

Proposed patch and test program attached.


Files

0001-Wt-asString-even-Wt-cannot-divide-by-zero.patch (1.07 KB) 0001-Wt-asString-even-Wt-cannot-divide-by-zero.patch Proposed patch Tristan Lanfrey, 12/09/2013 03:38 AM
WtTest.cpp (1.09 KB) WtTest.cpp Test program Tristan Lanfrey, 12/09/2013 03:38 AM
Actions #1

Updated by Koen Deforche almost 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2

Hey,

Oops indeed. We are so used in thinking in base-2 :-)

Regards,

koen

Actions #2

Updated by Koen Deforche almost 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF