1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

[245169] [traditional memory] divide by zero

This commit is contained in:
Ted Williams 2008-08-25 20:07:17 +00:00
parent 6f7abc2469
commit 8fa4117cae

View file

@ -125,6 +125,9 @@ public class AddressPane extends AbstractPane
cellOffset *= fRendering.getAddressableSize();
if(fRendering.getColumnCount() == 0) // avoid divide by zero
return new Point(0,0);
int row = cellOffset
/ (fRendering.getColumnCount() * fRendering.getBytesPerColumn() / fRendering
.getBytesPerCharacter());