diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp
index bd6b0653f67cdb0154a57c382acdbcc061fb0638..734f11f3548a4063a06eee8b9fb6a80b17bb2c88 100644
--- a/Geo/GeoStringInterface.cpp
+++ b/Geo/GeoStringInterface.cpp
@@ -1,4 +1,4 @@
-// $Id: GeoStringInterface.cpp,v 1.17 2008-02-23 15:30:07 geuzaine Exp $
+// $Id: GeoStringInterface.cpp,v 1.18 2008-02-25 15:36:38 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -37,7 +37,7 @@ extern Context_T CTX;
 // Some old systems don't have snprintf... Just call sprintf instead.
 
 #if defined(HAVE_NO_SNPRINTF)
-int snprintf(const char *str, size_t size, const char* fmt, ...){
+int snprintf(char *str, size_t size, const char* fmt, ...){
   va_list args;
   va_start(args, fmt);
   int ret = vsprintf(str, fmt, args);
diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp
index 4bd3a392415a215bc6a8d142de7c74f76b43ba4d..0210e27297fecd1bb6e23e45af2fc4eb0e241185 100644
--- a/Post/PViewDataGModel.cpp
+++ b/Post/PViewDataGModel.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewDataGModel.cpp,v 1.19 2008-02-24 21:05:04 geuzaine Exp $
+// $Id: PViewDataGModel.cpp,v 1.20 2008-02-25 15:36:38 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -24,9 +24,9 @@
 
 #include "PViewDataGModel.h"
 #include "MElement.h"
-#include "Message.h"
 
 PViewDataGModel::PViewDataGModel(GModel *model) : _model(model)
+
 {
   // store vector of GEntities so we can index them efficiently
   for(GModel::eiter it = _model->firstEdge(); it != _model->lastEdge(); ++it)
@@ -50,16 +50,19 @@ PViewDataGModel::PViewDataGModel(GModel *model) : _model(model)
      
      When reading a .msh file:
 
-     nodeData.resize(std::max(_model->getMaxNodeDataIndex(), numDataInFile));
+     if(nodeData[step - 1].size())
+       nodeData[step].values.resize(nodeData[step - 1].size());
+     else
+       nodeData[step].values.resize(numDataInFile);
      loop over lines:
        * get node number in file
        * get vertex pointer from _model->getVertexByTag(num)
        * if MVertex has no dataIndex:
            increment it (need global value stored in GModel)
-           fill std::vector<double> tmp
-           nodeData[step].push_back(tmp)
-         else:
-           add data nodeData[step][dataIndex]
+         else
+           use the one that's stored
+       * if(dataIndex > nodeData[step].size()) nodeData[step].resize(dataIndex + 1)
+       * fill nodeData[step].value[dataIndex]
 
      .msh file format: