James Mckenzie wrote:
Nikolay Sivov  wrote at Oct 2, 2009 11:37 AM (PNT)
Aric Stewart wrote:
---
 dlls/comctl32/listview.c |   39 ++++++++++++++++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 5 deletions(-)

Hi, Aric.


Also this is unsafe:
---
+ row_count = wWidth / (rcBox.right - rcBox.left);
---

Is this preceeded with a zero check?  Otherwise you could end up with a 
run-time divide by zero error or worse, a negative row count.  Also, if the box 
were small and the item wide, you could end up with a condition where the box 
might be larger than the screen height.

James McKenzie
Hi, James. Wrongly addressed actually :).

It's better to reuse coord. calculation code here as I mentioned in reply. Tests needed anyway....


Reply via email to