pspp-dump-sav: Fix sizeof on "array" that is actually a pointer.
[pspp-builds.git] / utilities / pspp-dump-sav.c
index a89a86ea641e559d432c29f78f8fb439e79ccb79..54e4712b589830f548b8d2efbeeb4eb75097cbe3 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <inttypes.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -458,7 +459,7 @@ print_untyped_value (struct sfm_reader *r, char raw_value[8])
   double value;
 
   value = float_get_double (r->float_format, raw_value);
-  for (n_printable = 0; n_printable < sizeof raw_value; n_printable++)
+  for (n_printable = 0; n_printable < 8; n_printable++)
     if (!isprint (raw_value[n_printable]))
       break;