[GRASS-SVN] r57828 - grass/trunk/raster/r.sunmask

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 24 20:58:06 PDT 2013


Author: hamish
Date: 2013-09-24 20:58:06 -0700 (Tue, 24 Sep 2013)
New Revision: 57828

Modified:
   grass/trunk/raster/r.sunmask/main.c
Log:
hour=08 and hour=09 were being scanned as '0' due to %i reading those as base 8, so use %d instead

Modified: grass/trunk/raster/r.sunmask/main.c
===================================================================
--- grass/trunk/raster/r.sunmask/main.c	2013-09-25 01:02:36 UTC (rev 57827)
+++ grass/trunk/raster/r.sunmask/main.c	2013-09-25 03:58:06 UTC (rev 57828)
@@ -297,12 +297,12 @@
 	sscanf(parm.opt4->answer, "%lf", &dazi);
     }
     else {
-	sscanf(parm.year->answer, "%i", &year);
-	sscanf(parm.month->answer, "%i", &month);
-	sscanf(parm.day->answer, "%i", &day);
-	sscanf(parm.hour->answer, "%i", &hour);
-	sscanf(parm.minutes->answer, "%i", &minutes);
-	sscanf(parm.seconds->answer, "%i", &seconds);
+	sscanf(parm.year->answer, "%d", &year);
+	sscanf(parm.month->answer, "%d", &month);
+	sscanf(parm.day->answer, "%d", &day);
+	sscanf(parm.hour->answer, "%d", &hour);
+	sscanf(parm.minutes->answer, "%d", &minutes);
+	sscanf(parm.seconds->answer, "%d", &seconds);
 	sscanf(parm.timezone->answer, "%lf", &timezone);
     }
 



More information about the grass-commit mailing list