Hi,
The labels on the y-axis of graphs drawn with drawBar() would overflow at
2^32 (unsigned long) data units. Below patch fixes it on my machine.
Regards,
-- Robbert
--- graph.c.original 2003-07-23 12:10:42.000000000 +0200
+++ graph.c 2003-07-23 13:30:28.000000000 +0200
@@ -176,8 +176,8 @@
float maxval=0;
int center_x, center_y;
float total, yscale, txtsz, txtht;
- unsigned long vmargin, hmargin, base, xsize, ysize, ngrid, dydat, dypix,
ydat, xpos, ypos;
- unsigned long padding, ymax, ymin, xmax, xmin, gray;
+ float vmargin, hmargin, base, xsize, ysize, ngrid, dydat, dypix, ydat,
xpos, ypos;
+ float padding, ymax, ymin, xmax, xmin, gray;
im = gdImageCreate(width, height);
@@ -218,7 +218,7 @@
char str[16];
// height of grid line in units of data
- ydat = (int)(i * dydat);
+ ydat = i * dydat;
if(0) {
snprintf(str, sizeof(str), "%d", ydat);
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev