]> granicus.if.org Git - postgis/commitdiff
slight cleanup
authorBborie Park <bkpark at ucdavis.edu>
Sat, 24 Jan 2015 17:27:17 +0000 (17:27 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Sat, 24 Jan 2015 17:27:17 +0000 (17:27 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13198 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpg_create.c
raster/rt_pg/rtpostgis.c

index e9d5e494b7eaf303cc5c4fe3cec4ef167dfb02b7..76902cc2553033a583a5fa26f9aac4d465923f03 100644 (file)
@@ -715,7 +715,7 @@ Datum RASTER_addBandOutDB(PG_FUNCTION_ARGS)
                                elog(NOTICE, "Invalid band index %d for adding bands. Using band index 1", dstnband);
                                dstnband = 1;
                        }
-                       else if (dstnband > numbands) {
+                       else if (numbands > 0 && dstnband > numbands) {
                                elog(NOTICE, "Invalid band index %d for adding bands. Using band index %d", dstnband, numbands);
                                dstnband = numbands + 1; 
                        }
index c17210119fe0e18c711dced9ad24011bc9649084..a4f67c1d90f38a6d37dde2033935935c19efb3a0 100644 (file)
@@ -310,7 +310,7 @@ rtpg_assignHookGDALEnabledDrivers(const char *enabled_drivers, void *extra) {
        POSTGIS_RT_DEBUGF(4, "GDAL_SKIP = %s", CPLGetConfigOption("GDAL_SKIP", ""));
 }
 
-/* postgis.eanble_outdb_rasters */
+/* postgis.enable_outdb_rasters */
 static void
 rtpg_assignHookEnableOutDBRasters(bool enable, void *extra) {
        /* do nothing for now */