[GRASS-SVN] r42322 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 20 07:15:27 EDT 2010


Author: mmetz
Date: 2010-05-20 07:15:07 -0400 (Thu, 20 May 2010)
New Revision: 42322

Modified:
   grass/trunk/lib/vector/Vlib/hist.c
Log:
Vect_hist_copy: skip empty old hist

Modified: grass/trunk/lib/vector/Vlib/hist.c
===================================================================
--- grass/trunk/lib/vector/Vlib/hist.c	2010-05-20 11:09:16 UTC (rev 42321)
+++ grass/trunk/lib/vector/Vlib/hist.c	2010-05-20 11:15:07 UTC (rev 42322)
@@ -137,6 +137,11 @@
     if (Out->hist_fp == NULL)
 	return -1;
 
+    /* skip empty old hist */
+    G_fseek(In->hist_fp, (long)0, SEEK_END);
+    if (G_ftell(In->hist_fp) == 0)
+	return 0;
+
     G_fseek(Out->hist_fp, (long)0, SEEK_END);
     rewind(In->hist_fp);
 



More information about the grass-commit mailing list