From 12d0e312917faedd59bf9d6be890a0dcfd1c8e80 Mon Sep 17 00:00:00 2001
From: David Colignon <david.colignon@ulg.ac.be>
Date: Mon, 23 Apr 2007 09:36:45 +0000
Subject: [PATCH]  asprintf not available on Windows

---
 Mesh/Field.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index eedd01e0b0..8da052a31a 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// $Id: Field.cpp,v 1.2 2007-04-21 19:40:00 geuzaine Exp $
+// $Id: Field.cpp,v 1.3 2007-04-23 09:36:45 colignon Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -218,7 +218,9 @@ FunctionField::FunctionField(std::list<Field*> *_list, const char *str)
   names[2] = strdup("z");
   int p = 3;
   for(std::list<Field*>::iterator it = list->begin(); it != list->end(); it++){
-    asprintf(names + p, "f%i", p - 3);
+    char tmp[256] ; 
+    sprintf(tmp, "f%i", p - 3);
+    names[p] = strdup(tmp);
     p++;
   }
 #endif
-- 
GitLab