[GRASS-SVN] r30281 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 21 12:47:34 EST 2008


Author: 1gray
Date: 2008-02-21 12:47:34 -0500 (Thu, 21 Feb 2008)
New Revision: 30281

Modified:
   grass/trunk/lib/gis/ls.c
Log:
lib/gis/ls.c (G_ls_format): Fixed the division by zero bug when a name
or names exceed the terminal width.


Modified: grass/trunk/lib/gis/ls.c
===================================================================
--- grass/trunk/lib/gis/ls.c	2008-02-21 16:48:51 UTC (rev 30280)
+++ grass/trunk/lib/gis/ls.c	2008-02-21 17:47:34 UTC (rev 30281)
@@ -155,6 +155,7 @@
                       /* Auto-fit the number of items that will
                        * fit per line (+1 because of space after item) */
         perline = screen_width / (max_len + 1);
+        if (perline < 1) perline = 1;
     }   
    
     /* Field width to accomodate longest filename */



More information about the grass-commit mailing list