[devel] Fixed a long-standing bug in png_handle_sPLT() when

PNG_NO_POINTER_INDEXING is defined.
diff --git a/ANNOUNCE b/ANNOUNCE
index 44426c4..5d28b17 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.5.2rc02 - March 20, 2011
+Libpng 1.5.2rc02 - March 21, 2011
 
 This is not intended to be a public release.  It will be replaced
 within a few weeks by a public version or by another test version.
@@ -57,10 +57,12 @@
   Define remaining attributes to blank when MSC_VER<1300.
   ifdef out mask arrays in pngread.c when interlacing is not supported.
 
-Version 1.5.2rc02 [March 20, 2011]
+Version 1.5.2rc02 [March 21, 2011]
   Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak
     and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip"
     from the makefiles.
+  Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail
+    to compile when PNG_NO_POINTER_INDEXING is defined.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index 99040bb..bcb5aeb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3273,10 +3273,12 @@
   Define remaining attributes to blank when MSC_VER<1300.
   ifdef out mask arrays in pngread.c when interlacing is not supported.
 
-Version 1.5.2rc02 [March 20, 2011]
+Version 1.5.2rc02 [March 21, 2011]
   Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak
     and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip"
     from the makefiles.
+  Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail
+    to compile when PNG_NO_POINTER_INDEXING is defined.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/pngrutil.c b/pngrutil.c
index c3caac7..7855241 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1275,9 +1275,7 @@
 {
    png_bytep entry_start;
    png_sPLT_t new_palette;
-#ifdef PNG_POINTER_INDEXING_SUPPORTED
    png_sPLT_entryp pp;
-#endif
    png_uint_32 data_length;
    int entry_size, i;
    png_uint_32 skip = 0;
@@ -1442,7 +1440,7 @@
          pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
       }
 
-      pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
+      pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2;
    }
 #endif