jirentabu / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

The report contents dialog displays the contained file sizes in bytes, but with a "KB" unit #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Cause an error report.
2. Open the details dialog.
3. Pay attention to the contained file sizes being listed in bytes.

What is the expected output? What do you see instead?
The sizes are listed in bytes, but with a KB unit.

What version of the product are you using? On what operating system?
CrashRpt 1.2.0 r475 on Windows 7.

I suggest replacing the commented line below, with the following change to 
DetailDlg.cpp

//sSize.Format(TEXT("%d KB"), findFileData.nFileSizeLow);
double fFileSizeBytes = findFileData.nFileSizeLow;
_STPRINTF_S(sSize.GetBufferSetLength(20), 20, _T("%.2f KB"), fFileSizeBytes 
/ 1024);

... along with this addition to stdafx.h in crashsender:

For _MSC_VER < 1400:

#define _STPRINTF_S(strDest, sizeInChars, strSource, args) 
_stprintf(strDest, strSource, args)

... and otherwise:

#define _STPRINTF_S(strDest, sizeInChars, strSource, args) 
_stprintf_s(strDest, sizeInChars, strSource, args)

Sorry for not submitting this as a code review, but I got confused over how 
to set the entry about "/branches".

Original issue reported on code.google.com by jonas.no...@gmail.com on 11 Dec 2009 at 11:07

GoogleCodeExporter commented 9 years ago
Thanks for the info. We will include this fix into the v1.2.1 (probably will be
released this month).

Original comment by zexspect...@gmail.com on 11 Dec 2009 at 11:11

GoogleCodeExporter commented 9 years ago
Fixed in v.1.2.1

Original comment by zexspect...@gmail.com on 23 Dec 2009 at 7:08